| | |
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 asp barchart bitmap box broadcast c# check checkbox client column combobox control conversion csharp custom database databasesearch datagrid datagridview datagridviewcheckbox dataset datetime degrees development display draganddrop drawing encryption enum equation excel file form format formatting formbox forms formupdate function gdi+ image index input install java label linux list listbox mandelbrot math mouseclick mysql namevaluepairs networking operator packaging path photoshop picturebox pixelinversion post powerpacks programming radians regex remoting reporting richtextbox robot server sleep socket sql statistics stream string table text textbox thread time timer transform treeview update usercontrol validation visualstudio wait webbrowser wfa windows winforms wpf xml






