Hello, my name is Nick, i'm pretty much self taught when it comes to programming so i may miss some basics, but i think i'm doing pretty good. Anyway, i am trying to basically create a properties/toolbox for my application which needs plenty of communication between the mainfrm and toolform.
How could i basically set properties for the mainfrm it self and it's controls
Thanks
Loading
Hirendra SisodiyaPosted Apr 30, 2010, 1:22 AM
suppose on form1:
Public static string testprop;
now you can access this on Form2:
string text=Form1.testProp;
thanks
Please mark as answer if it helps
Nick IngramPosted Apr 29, 2010, 7:21 AM
Hirendra SisodiyaPosted Apr 29, 2010, 1:27 AM
suppose that there is textbox with named textbox1(with Public access modifier,see modifieres property of control inproperty window) on form1
than you want to access some property of this control on form2
you need to write code on form2 like this:
Form1 frm = new Form1();
string text = frm.Textbox1.Text;
thanks
Please mark as answer if it helps