473,394 Members | 1,750 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,394 software developers and data experts.

MDI Application - Need Help

Hello C#,
I am trying to create an MDI app in C# (Windows
Application). I have a "container" window. I would like
to add more than one child window to the container (2 for
starters). I would like to display one child first, and
when user clicks button of child1, child1 disappears, and
child2 displays. I would prefer to have one child open at
a time. I am assuming that I can have a method in the
Parent form - that can open and close child forms.
I would like to be able to pass either the form (i.e.
Child1, or Child2, etc), and then hide/close the active
child, and display the new child.

I have seen help info for creating multiple forms, but it
is not by name, but new instances of "form x" etc.

What is the proper way to open and close child forms by
name. (I may switch from buttons on a child form, to the
menu bar scheme, etc, since it is more "Windows" like).

Thanks,

eric
Nov 15 '05 #1
1 1212
I have created an MDI app that is similar to what you are taking about. I
created a toolbar that let the user move from child form to child form. I
am assuming that you want only one instance of each form. What I did was
create a singleton approach for each form making sure that each form could
have only one instance. There are many ways to control opening and closing
of the child forms. The easiest is to have a toolbar on the parent form
which will give you complete control on the parent instead of putting
buttons on the child forms which makes it more complicated. If you have any
more questions do not hesitate to ask.

"Eric W. Holzapfel" <eh*******@verizon.net> wrote in message
news:10****************************@phx.gbl...
Hello C#,
I am trying to create an MDI app in C# (Windows
Application). I have a "container" window. I would like
to add more than one child window to the container (2 for
starters). I would like to display one child first, and
when user clicks button of child1, child1 disappears, and
child2 displays. I would prefer to have one child open at
a time. I am assuming that I can have a method in the
Parent form - that can open and close child forms.
I would like to be able to pass either the form (i.e.
Child1, or Child2, etc), and then hide/close the active
child, and display the new child.

I have seen help info for creating multiple forms, but it
is not by name, but new instances of "form x" etc.

What is the proper way to open and close child forms by
name. (I may switch from buttons on a child form, to the
menu bar scheme, etc, since it is more "Windows" like).

Thanks,

eric

Nov 15 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Guillaume | last post by:
Hi i need to run my VB.NET application on my browser. If you know hoy ia can this, please send me e-mail with explcations. If you can, I need clear explanation because I am newbie in VB.NET ...
12
by: serge calderara | last post by:
Dear all, I have an application which is suppose to start another executable process. As soon as that process is running, I need to retrive its handle. The problem of the particular process I am...
11
by: Timothy Shih | last post by:
Hi, I am having a freezing issue with my application. My application serves several remotable objects, all of which must be initialized before their use. Furthermore, some of them depend on each...
4
by: Dave | last post by:
I need to add the ability to drag from a Windows Form and drop into a non dotNet application. For example, having a generated image in my app that I wish to drag out into explorer as a friendly way...
21
by: Chris | last post by:
I'm trying to get an existing VS.NET project up on my Win2003 server and I get the following error (on the actual website page): "It is an error to use a section registered as...
9
by: Graham | last post by:
I have been having some fun learning and using the new Controls and methods in .Net 2.0 which will make my life in the future easier and faster. Specifically the new databinding practises and...
4
by: bob lambert | last post by:
Help I am trying to deploy to another pc a vb.net std 2002 windows form application. I am confused. I created a project - windows form I built form, compiled and debugged. I created a...
4
by: bkasmai | last post by:
My asp.net application (developed using vs2003) runs fine on a windows 2000 server using iis 5.0. Our network manager wants to do away with any http connections and only use https for services that...
35
by: salad | last post by:
I have an application written in MS-Access. It is a complete application that manages the day-to-day operations of a business. The program is nearly ready to be used in other customer sites. ...
4
by: Dave | last post by:
I have a global.asax file with Application_Start defined and create some static data there and in another module used in the asp.net application and I realize that static data is shared amongst...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
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...

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.