| | |
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 access algorithm api array asp.net barchart bitmap box broadcast c# check checkbox client combobox control conversion csharp custom database databaseconnection datagrid datagridview dataset datetime dbconnection degrees design development draganddrop drawing encryption enum eventhandlers excel file firefox form format forms function gdi+ grantorrevokepermissionthroughc#.net image index input install java label libraries list listbox loop mandelbrot marshalbyrefobject math mouseclick movingimage mysql netcfsvcutil.exe operator path photoshop php picturebox pixelinversion platform post programming radians regex remoting resourcefile richtextbox server sleep socket sql statistics stream string study system.servicemodel table tcpclientchannel text textbox thread time timer update usercontrol validation visualstudio webbrowser windows winforms wpf wpfc# xml






