How to make a new MDI child form maximum size?
-
I had a MDI WinForm Program, when click from a menu item, I new a new child WinForm(this child WinForm designed in the designer), but this new child WinForm is not maximumed even I set the childForm.WindowState = System.Windows.Forms.FormWindowState.Maximized; Could you show me how to do this? Thanks in advance!
-
I had a MDI WinForm Program, when click from a menu item, I new a new child WinForm(this child WinForm designed in the designer), but this new child WinForm is not maximumed even I set the childForm.WindowState = System.Windows.Forms.FormWindowState.Maximized; Could you show me how to do this? Thanks in advance!
if you want this child to be open as a separate maximized form then try this below code..
//menu click event in MDI parent
CHildForm frm = new CHildForm();
frm.WindowState=FormWindowState.Maximized;
frm.ShowDialog();[or] if you want this child to be open as maximized within the MDI parent, then try this..
//menu click event in MDI parent
CHildForm frm = new CHildForm();
frm.WindowState=FormWindowState.Maximized;
frm.Show();hope this hepls.
with regards Karthik Harve
-
if you want this child to be open as a separate maximized form then try this below code..
//menu click event in MDI parent
CHildForm frm = new CHildForm();
frm.WindowState=FormWindowState.Maximized;
frm.ShowDialog();[or] if you want this child to be open as maximized within the MDI parent, then try this..
//menu click event in MDI parent
CHildForm frm = new CHildForm();
frm.WindowState=FormWindowState.Maximized;
frm.Show();hope this hepls.
with regards Karthik Harve
Actually, I am doing this, this doesn't work. Maybe some property I've set wrong?