I would like to disable the restore button (either make it non-
clickable or hidden) in an MDIChild. However, I want the form to be
maximized first (by code WindowState = FormWindowState.Maximized)
before the form is shown. I also want the user to still be able to
close the window by clicking the X.
I have been able to achive this by the following:
frm.MdiParent = MasterForm.MdiParent
frm.MinimizeBox = False
frm.MaximizeBox = False
frm.Show()
frm.WindowState = FormWindowState.Normal
frm.WindowState = FormWindowState.Maximized
However, this causes the form to "flash" in a normal state and then
maximize. If I just set the min and max properties to false the state
to maximized and show the form, the button is still available to be
clicked. Its only when the code happens in the above order that I have
gotten it to work.
I don't mind intercepting API messages to accomplish this.
Thanks,
Matt