| | |
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 array barchart bitmap box broadcast c# check checkbox client combobox control conversion csharp custom cyclethruopenforms data database datagrid datagridview dataset date/time datetime degrees development dll draganddrop drawing encryption enum event excel file finalyearproject form format forms function gdi+ getoutlookcontactusinfcsvfile globalization httpwebrequest image index input install installer java label list listbox mandelbrot math mono mouseclick mysql operator panel path photoshop picturebox pixelinversion post programming radians regex remote remoting richtextbox save server silverlight sleep socket sql sql-server statistics stream string table text textbox thread time timer timespan update usercontrol users validate validation visualstudio webbrowser wia windows winforms wpf xml






