Im new to C# and im doing a project that requires to integrate many forms in a single form. for eg, Form1 is my main form. when i clicked on a button or links in the main form the new form should open ....i any of u know how to do this pls tel me
How to handl multiple forms from single form in c#.net
Collapse
X
-
Hi, Its very simple like...
on button or link event just add this code
say you have 2 form
frmMain, frmChild
you want to call frmChild from frmMain
code will be
frmChild oChildForm=new frmChild;
oChildForm.Show Dialog();
it protect u from opening another from without close the oChildForm. if you want to open multiple form at a time use the following code.
oChildForm.Show ();
!!! SHIPON !!! -
You can use a MDI form instead.......Originally posted by neehakaleIm new to C# and im doing a project that requires to integrate many forms in a single form. for eg, Form1 is my main form. when i clicked on a button or links in the main form the new form should open ....i any of u know how to do this pls tel me
Read about MDI form hereComment
-
I think as you are new to C#,
Use design view. and also most of time, we dont need to do it using code.
and you are not at this stage as u r newbie, to do it using code.
still u want to try then see ur form.designer.c s for more information how you can achieve it without designing the form.
Originally posted by neehakaleTnk u very much.......but b4 seeing to ur replies i have done that by 1st method......... ..Nw i have 1 new problem.....IS THERE ANY METHOD TO DIRECTLY DESIGN THESE FORMS LIKE WE DESIGN MAIN FORM WITH THE HELP OF TOOL BOX............ .Comment
Comment