i have three forms, mainform(which is the "MAIN") log-in and home form. when accessing buttons in the main form to enable it i did this. its property is set to public.
(this.Owner as Main).homebtn.Enabled = true;
after logging in homebtn is anabled, when clicked, the home form will show and it has a label. now what i wanna do is set the label.text="something" when homebutton is click.
what i did is this.
(this.Owner as homeform).Label1.text="something"
then error...
error is: Object reference not set to an instance of an object.
how do you control the label from mainform to homeform???:sweat:
thanks