| | |
Using multiple forms in c# windows application
Please support our C# advertiser: Intel Parallel Studio Home
Thread Solved |
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
Get the value of form2's textbox
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
c# Syntax (Toggle Plain Text)
Form2 form2 = new Form2(); fom2.ShowDialog();//enforces user to not back to form1 unless finishing work on form2
Get the value of form2's textbox
c# Syntax (Toggle Plain Text)
string str = form2.textbox2.Text;
BI Developer | LINKdotNET
B.Sc Computer Science, Helwan University
Technical blog | http://ramymahrous.wordpress.com
LinkedIn | http://www.linkedin.com/in/ramymahrous
B.Sc Computer Science, Helwan University
Technical blog | http://ramymahrous.wordpress.com
LinkedIn | http://www.linkedin.com/in/ramymahrous
•
•
Join Date: Sep 2008
Posts: 1
Reputation:
Solved Threads: 0
I get this:
It tells me that "Mail.Form3.textBox1 Is inaccesable due to its pro tsction level."
PLEASE HELP!!!
private void button2_Click(object sender, EventArgs e)
{
Form3 form3 = new Form3(); form3.ShowDialog();
string str = Form3.textBox1.Text;
}PLEASE HELP!!!
•
•
Join Date: Mar 2008
Posts: 6
Reputation:
Solved Threads: 0
•
•
•
•
I get this:
It tells me that "Mail.Form3.textBox1 Is inaccesable due to its pro tsction level."private void button2_Click(object sender, EventArgs e) { Form3 form3 = new Form3(); form3.ShowDialog(); string str = Form3.textBox1.Text; }
PLEASE HELP!!!
![]() |
Similar Threads
- Open Same forminstance Multiple times (C++)
- memory management in wndows 2000 (Windows NT / 2000 / XP)
- HOWTO: Share an SQL Connection between multiple forms within the same project (C#)
- P2P based chat (C#)
Other Threads in the C# Forum
- Previous Thread: Stupid Question
- Next Thread: XML attributes to Combobox
| Thread Tools | Search this Thread |
.net 2007 access algorithm array barchart bitmap box broadcast c# camera check checkbox client combobox control conversion cs4 csharp custom customactions database datagrid datagridview dataset date datetime degrees development draganddrop drawing encryption enum event eventcloseformc# excel file form format forms function gdi+ handler httpwebrequest image index input install java keypress label list listbox listener listview load mandelbrot math mouseclick mysql operator path photoshop picturebox pixelinversion post programming radians regex remote remoting resolved. richtextbox search security server sleep socket sql statistics stream string table text textbox thread time timer update usercontrol validation view visual visualstudio webbrowser windows winforms wordautomation wpf xml






