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
How do i access another forms properties
3 Answers
Know the answer? Post it. Somebody with the same question will find it here.

Hirendra SisodiyaRank #258 · 9.8K reputationPosted Apr 29, 2010, 9:22 PM EDT
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
Hirendra SisodiyaRank #258 · 9.8K reputationPosted Apr 28, 2010, 9:27 PM EDT
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
Nick Ingram12 reputationPosted Apr 29, 2010, 3:21 AM EDT