21
Answers

Multiple forms Windows applications(questions)

alobiuc

alobiuc

15y
10.8k
1
well, I'm quite new to C#, though i am well-acquainted to C/C++. What bothers me is: -ok, I create a new Windows app project and I get stocked with Form1; I'll add to it the controls I need (e.g. a textBox1), yet I want to add a Form2, not programmatically, but by the designer; -after doing that, in Form1's code I add something like: Public Form2 f2=new Form2(); -but, if I want to modify the text within Form1.textBox1 in f2's code like this: Form1.textBox1.Text="..." a error message is issued: "An object reference is required for the nonstatic field...textBox1. Why's that? P.S. : also, I wrote: Form1.AddOwned(f2). Waiting for an answer.

Answers (21)