I\'m very new to c# and am trying my first experiments with 2 different forms.
I\'d like to make it so you have a label1 and a button1 on Form1, and a checkbox1 on F
In this scenario you could use the CheckedChanged event:
public void checkbox2_CheckedChanged(object sender, EventArgs e) {
if (checkbox2.Checked)
{
Form1.Label1.Text = "Checkbox 2 has been checked";
} else
{
Form1.Label1.Text = "";
}
}
http://www.c-sharpcorner.com/uploadfile/mahesh/checkbox-in-C-Sharp3/
Note you will have to change the Access Modifier in Form1 and make Label1 public so Form2 can alter the Text property.
To do this, goto Form1, select Label1 goto Properties, select Modifiers and change from Private to Public. Form2 will then have access to the Label.