Click here to Skip to main content
15,998,231 members
Please Sign up or sign in to vote.
3.50/5 (2 votes)
See more:
Dear All,


Now i have one window form and am split that form by 2 panels. Here

one panel having some buttons. and other panel is empty. now if i click one button

means another form is open exactly inside of another panel. is that possible..??? if

yes means how... All replies are welcome here..



Thanks in Advance

Dhinesh kumar.V
Posted
Comments
Sergey Alexandrovich Kryukov 30-Jul-12 13:05pm    
Why on Earth doing so?
--SA
OriginalGriff 30-Jul-12 14:10pm    
This should be a comment to your reply, but that doesn't want to post for some reason so I thought I'd try here...
"I agree - at the very least I would re-do it as a user control and embed that in a form and a panel separately. But some of our questioners won't take criticism until their best mates takes one look and start to laugh!
You can tell 'em, and tell 'em 'til you're blue in the face... :D"
Sergey Alexandrovich Kryukov 30-Jul-12 14:40pm    
Not to worry -- received separate notifications on all three of your comments on this page -- thank you.
--SA

1 solution

Yes.
C#
frmInputBox fib = new frmInputBox();
fib.TopLevel = false;
fib.Visible = true;
panContainer.Controls.Add(fib);
fib.Dock = DockStyle.Fill;
 
Share this answer
 
Comments
hari19113 30-Jul-12 13:00pm    
Nice answer...Thanks even helped me...
OriginalGriff 30-Jul-12 14:02pm    
You're welcome!
Sergey Alexandrovich Kryukov 30-Jul-12 13:05pm    
It would be a great answer is you mentioned that doing so is totally pointless.
The parent-child relationship between defunct for forms, for a good reason -- it is not needed. By Toplevel = false you override this limitation, but the result is pretty much useless or ugly. It's the best to re-thing the design.
--SA
OriginalGriff 30-Jul-12 14:08pm    
I agree - at the very least I would re-do it as a user control and embed that in a form and a panel separately. But some of our questioners won't take criticism until their best mates takes one look and start to laugh!
You can tell 'em, and tell 'em 'til you're blue in the face... :D
Sergey Alexandrovich Kryukov 30-Jul-12 14:38pm    
Usually I start to lough right away, not waiting for their best friends, but not all inquirers can get it... :-)
--SA

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