Windows Develop Bookmark and Share   
 index > Windows Forms Designer > Controls in MDI form
 

Controls in MDI form

Hi all!
Thanks a lot it worked :)..I have another query..like i am not using default menu strip for navigating to the child forms,instead i am using some controls like buttons and links for navigating to the child forms and i have placed those controls in the MDI Container . so i want those controls to disappear on link/button click(ie when the child form opens)andreappear when i exit the child form .All this should happen within the MDI or the parent form and no new window should be opened in the taskbar ..
harini_pavi  Tuesday, July 14, 2009 4:29 AM
Okay..

After you show the form set the visibility of the control to false.
Form1 frm = new Form1();
frm.MdiParent = this;
frm.Show();
btnShowForm1.Visible = false;




and on the form_closing event set the visibility of the control to true.
Suppose your MDI parent Form name is MDIParent1

then in the form_closing method
MDIParent1 parentForm = (MDIParent1) this.MdiParent ;
parentForm.btnShowForm1.Visible = true;

Prasant
Prasant Swain  Tuesday, July 14, 2009 12:29 PM
Okay..

After you show the form set the visibility of the control to false.
Form1 frm = new Form1();
frm.MdiParent = this;
frm.Show();
btnShowForm1.Visible = false;




and on the form_closing event set the visibility of the control to true.
Suppose your MDI parent Form name is MDIParent1

then in the form_closing method
MDIParent1 parentForm = (MDIParent1) this.MdiParent ;
parentForm.btnShowForm1.Visible = true;

Prasant
Prasant Swain  Tuesday, July 14, 2009 12:29 PM

You can use google to search for other answers

Custom Search

More Threads

• CustomControl with SplitContainer crashes VS2008 designer
• Obtain the control beneath the cursor
• ComboBox.ClientSize.Width - broken?
• Custom Component Designer - Visual Studio Design time environment
• How to Create Button which have ecliptic form
• How to create new property (cols,Rows) to DataGridView
• Custom Toolstrip Collection Items options are not save.
• Visual Studio Designer will not render User Control
• Oder of events for textbox
• adding method in designer form