By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,158 Members | 917 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,158 IT Pros & Developers. It's quick & easy.

open a new form that will added to an existing one...

P: n/a
oo
Hi all,
I am relatively new to .NET and C#.
I am trying to open an additional (new) form when a button is clicked
on an already existing form, but i want that this winform will be
added to the first winform (from Basic to advanced window).
How do i do this?
Thanks in advance
Nov 16 '05 #1
Share this Question
Share on Google+
5 Replies


P: n/a
Hi,

I guess you want to create an MDI (Multiple Document Interface) form which
has it's child forms.
To do this, follow these steps:
1. set the IsMdiContainer property of the parent form to true.
2. Create your child form and set it's MdiParent property to the parent form.

HTH,
Rakesh Rajan

"oo" wrote:
Hi all,
I am relatively new to .NET and C#.
I am trying to open an additional (new) form when a button is clicked
on an already existing form, but i want that this winform will be
added to the first winform (from Basic to advanced window).
How do i do this?
Thanks in advance

Nov 16 '05 #2

P: n/a
Thanks for the replay, but this is not what I meant.
My question is:
I want that the new form will be connected to the exiting form - that it
will look like it is the same form. Like a basic display and when I will
press a button I will get an advanced display (same border and when I
will change the size of one form the size of the other one will be
change automatically...)
I hope this is clearer
Waiting for your answer
Thanks again


*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 16 '05 #3

P: n/a
Hi,

I guess you will have to do that programmatically. AFAIK there is no direct
method to do that.

You could easiliy have an instance in the second form and then manipulate
the first one. Won't that do?

HTH,
Rakesh Rajan

"osnat o" wrote:
Thanks for the replay, but this is not what I meant.
My question is:
I want that the new form will be connected to the exiting form - that it
will look like it is the same form. Like a basic display and when I will
press a button I will get an advanced display (same border and when I
will change the size of one form the size of the other one will be
change automatically...)
I hope this is clearer
Waiting for your answer
Thanks again


*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Nov 16 '05 #4

P: n/a
Hi,

If I understand you correctly you can do this by putting all controls for
one form on a single panel or container control (custom control) of your
choice and the controls for the other form on another panel/container. At
the click of the button, the panels will switch visibility, hiding one and
showing the other panel.

Happy Coding!
Morten Wennevik [C# MVP]

"osnat o" <oo****@hotmail.com> skrev i melding
news:ux**************@tk2msftngp13.phx.gbl...
Thanks for the replay, but this is not what I meant.
My question is:
I want that the new form will be connected to the exiting form - that it
will look like it is the same form. Like a basic display and when I will
press a button I will get an advanced display (same border and when I
will change the size of one form the size of the other one will be
change automatically...)
I hope this is clearer
Waiting for your answer
Thanks again


*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Nov 16 '05 #5

P: n/a
If you really want it to look like one form, then put all the information on
one form. It can start with the "advanced" controls hidden, and the form
size smaller so they don't show. Then on the click, show the hidden
controls, and change the size of the form so they will fit.

Yes, the advanced controls at least should be on their own panel (or
similar.) So you say something like foreach( Control c in panel1.Controls)
{ c.Show(); }
and also something like
Form1.Height += panel1.Height;
when you want to show the advanced information.

-Rachel

"Morten Wennevik" <Mo************@hotmail.com> wrote in message
news:Ol**************@TK2MSFTNGP09.phx.gbl...
Hi,

If I understand you correctly you can do this by putting all controls for
one form on a single panel or container control (custom control) of your
choice and the controls for the other form on another panel/container. At
the click of the button, the panels will switch visibility, hiding one and
showing the other panel.

Happy Coding!
Morten Wennevik [C# MVP]

"osnat o" <oo****@hotmail.com> skrev i melding
news:ux**************@tk2msftngp13.phx.gbl...
Thanks for the replay, but this is not what I meant.
My question is:
I want that the new form will be connected to the exiting form - that it
will look like it is the same form. Like a basic display and when I will
press a button I will get an advanced display (same border and when I
will change the size of one form the size of the other one will be
change automatically...)
I hope this is clearer
Waiting for your answer
Thanks again


*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!


Nov 16 '05 #6

This discussion thread is closed

Replies have been disabled for this discussion.