0
In my code I am inside a Usercontrol that is not inside the Form and I would like to change the properties of my Form through this Usercontrol. Example of my code:
private void btn_Click(object sender, EventArgs e) //Botão dentro do UserControl
{
Form1 frm1 = new Form1();
frm1.label.Text = "Changed";
}
I put the Label component that is in Form1 as Public, I installed the Form1 inside my Usercontrol and I finished the component, changing its text, but I click and no change happens in Form1, so my question is, how can I change the properties of a Form through a Usercontrol that is not in this Form.
That’s exactly what I needed, Thanks
– Raphael Villadouro