473,396 Members | 1,915 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

How to handl multiple forms from single form in c#.net

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
Aug 24 '07 #1
5 1789
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.ShowDialog();


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 !!!
Aug 24 '07 #2
dip_developer
648 Expert 512MB
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
You can use a MDI form instead.......

Read about MDI form here
Aug 24 '07 #3
Tnk 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.............
Aug 24 '07 #4
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.cs for more information how you can achieve it without designing the form.

Tnk 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.............
Aug 24 '07 #5
I got tha answer of above question also...tnku very much for help
Aug 24 '07 #6

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Chris Beach | last post by:
Hi, I have a JSP page with several forms on it. Some of these forms are generated dynamically, and each of them submits some information to a database. Handling one form is easy, as I can...
11
by: dskillingstad | last post by:
I've been struggling with this problem for some time and have tried multiple solutions with no luck. Let me start with, I'm a novice at Access and I'm not looking for someones help to design my...
0
by: jon | last post by:
Using Visual C++ and MFC, one could generate a very nice MMI using CFormView and the method detailed in the MSDN "vswap" example to allow multiple forms to be viewed ( switched to ) within a single...
0
by: rayone | last post by:
Hi folks. I need advice. 2 options, which do you think is the better option to display/retrieve/report on the data. Keep in mind reporting (Crystal), SQL Performance, VB Code, usability,...
3
by: Pint | last post by:
I have a simple web user control. I'd like for this form to appear twice on a single aspx page. How do I get around the problem of having more than one <form runat=server> tag? More background:...
2
by: John Granade | last post by:
I'm looking for the best way to make a dataset available from multiple Windows forms. The dataset is created from an XML file. I have a main form (frmMain) that loads the dataset and reads the...
3
by: imrantbd | last post by:
I need array type name like "destList" must use for my destlist select box,not a single name.Or need a solution to capture multiple value of "destList" select box and send all selected value in php...
5
by: c676228 | last post by:
Hi everyone, my colleagues are thinking about have three insurance plans on one asp page: I simplify the plan as follow: text box:number of people plan1 plan2 plan3
6
by: Bob Alston | last post by:
Looking for someone with experience building apps with multiple instances of forms open. I am building an app for a nonprofit organizations case workers. They provide services to the elderly. ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.