Click here to Skip to main content
15,881,852 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
c# code for link one form to other forms
Posted
Comments
AMUAIT 30-Jan-12 15:19pm    
how can i link many forms by using c#?
theanil 30-Jan-12 15:31pm    
link in what sense?

i m not getting ur question clearely but may be u want this

suppose u want to show form2

Form2 f2 = new Form2();
f2.Show();
 
Share this answer
 
Hi Amuait.

If you are referring to an MDI application then:

1. Set the property "IsMdiContainer" to "true" in your main form (Parent Form).
2. For each form you wish to open / show within the parent form:

C#
AForm MyChildForm = new AForm();
AForm.MdiParent = MyMainForm;
AForm.Show();


If the above is not what you're looking for, could you explain your requirement in a bit more detail....
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900