Got another thing that works obtaining and changing if im correct (sure did help me out before think ill need to use it in my current project to...)
Form Application:
Form1:
Code:
Form2 frm2;
public Form1()
{
initialize();
frm2 = new Form2(this);
}
Form2:
Code:
private Form1 form1;
public Form2(Form1 frm1)
{
initialize();
form1 = frm1;
}
Form2_Load(object sender,EventArgs e)
{
form1.Location = new Point(0.0);
}
for example.
Works Compiled it and works like this:
Form1:
Code:
namespace controlbox
{
public partial class Form1 : Form
{
Form2 frm2;
public Form1()
{
InitializeComponent();
frm2 = new Form2(this);
}
public CheckBox Checkbox1
{
get
{
return checkBox1;
}
}
private void Form1_Load(object sender, EventArgs e)
{
frm2.Show();
}
private void checkBox1_CheckedChanged(object sender, EventArgs e)
{
}
}
}
Form2:
Code:
namespace controlbox
{
public partial class Form2 : Form
{
bool statuscheck = false;
private Form1 form1;
public Form2(Form1 frm1)
{
InitializeComponent();
form1 = frm1;
}
private void Form2_Load(object sender, EventArgs e)
{
}
private void button1_Click(object sender, EventArgs e)
{
statuscheck = !statuscheck;
form1.Checkbox1.Checked = statuscheck;
}
}
}
though i do know that you can use the main form to change all others... but this bypasses the main one making it possible to interact with more then 1.
(noob bumper should know better.)