![]() |
| ||
| Using multiple forms in c# windows application HI, How to use multiple forms in c# windows application? Where i need to fetch the information form "Form2" to "Form1". Here Form2 is used to get information from user and again those informations will be used in Form1. Please suggest me to do this. Thanks a lot, Anjali :) |
| ||
| Re: Using multiple forms in c# windows application You mean MDI? or just you need to open Form2 from Form1 and use some values in Form1 user entered in Form2?? For second case, just create another Form let say it called Form2, some public members (TextBox, ListBox, etc...) Add this code in Form1 to open Form2 Form2 form2 = new Form2(); Get the value of form2's textbox string str = form2.textbox2.Text; |
| ||
| Re: Using multiple forms in c# windows application Set properties in the form2, and then retrieve them when form1 becomes active again. |
| ||
| Re: Using multiple forms in c# windows application Its displaying blank values for entered textboxes in Form2. When Form2 will disappear after entering the values, then how it will load the textbox values in Form1? What we need to add in Form2? Please suggest me for this. Thanks a lot, Anjali..... |
| ||
| Re: Using multiple forms in c# windows application Hey its working fine now... Thanks a lot for your suggestions. Thanks, Anjali ..... :) :) |
| ||
| Re: Using multiple forms in c# windows application "Set properties in the form2, and then retrieve them when form1 becomes active again" Which proerty i have to set, can u please guide me. Thanks Chirag |
| ||
| Re: Using multiple forms in c# windows application I get this: private void button2_Click(object sender, EventArgs e)It tells me that "Mail.Form3.textBox1 Is inaccesable due to its pro tsction level." PLEASE HELP!!! |
| ||
| Re: Using multiple forms in c# windows application Because you said "Form3.textBox1.Text" you're not accessing the variable of the form you just created... you're trying to access the class direct, change "Form3.textBox1" to "form3.textBox1" |
| ||
| Re: Using multiple forms in c# windows application Quote:
|
| All times are GMT -4. The time now is 3:50 am. |
Forum system based on vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©2003 - 2009 DaniWeb® LLC