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

c# .NET Windows form

P: 1
hi can any one tell how can i open sub form in same main form window by clicking the sub form button
i.e
main form has two sub form buttons
1:Student form button
2:teachers form button
now i click on student form button it opens new window but i want that it should b open in main form window........
May 1 '13 #1
Share this Question
Share on Google+
2 Replies


100+
P: 158
Hey sheraz17, 1) set IsMdiContainer property to true to your main form. 2) After taking the object to your subform in your main form set your subform's MdiParent property to your main form (i.e., this) . 3) Now show your subform.
May 2 '13 #2

Beigirad
P: 7
hi there

You can put a Panel on main form and set FormBoarderStyle of sub form to none. after that you should add sub form such as a control to the Panel.

Good Luck
May 28 '13 #3

Post your reply

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