Possible Duplicate:
C# Text don’t display on another form after double clicking an item in listbox
I am beginner in c#. I want to edit a label lblText present in a form subForm from other form mainForm whenever user clicks the buttons btnHigh and btnLow(these buttons are in mainForm).
For btnHigh_Click event --> lblText should have text "high"
For btnLow_Click event --> lblText should have text "low"
I tried the below code 🙁not working)
btnHigh_Click Event
subForm sf = new subForm ();
sf.ShowDialog();
sf.lblText.Text = "High"; // lblText --> modifier is public
What i am doing wrong here?
Please Help
Thanks in Advance.
you need to change the value first before showing the form,