Question MaximizedBox resets to true when WindowState is set to maximized?

Never

Member
Joined
Oct 2, 2008
Messages
19
Programming Experience
5-10
7/6/9

Good morning sirs and ma'ams,

I am trying to maximize an mdichild within an mdiparent then setting its maximizedbox property to false such that:

frm.windowstate = formwindowstate.maximized
frm.maximizedbox = false
frm.show()

But, the maximizedbox/"restorebox" resets to true after the form shows. What is the proper way of doing this? I don't want to set controlbox = false because I think I still need the minimizedbox and the "closebox". I was looking for a restorebox but this property is not available.

Advanced thank you to any respondent. Thank you.

7/7/9

Good morning. I have tried setting the different formborderstyles especially the fixedsingle, thinking that it will only show the close button. But, once the mdichild is maximized within the mdiparent, all the controlbox buttons still gets displayed. Of course if the formborderstyle is set to none, the controlbox will not be displayed. But I don't want to do this since I think I still need the minimizedbox and the "closebox".

I noticed that I can disable the minimizebox with no problems though. But the "restorebox" is really what I want to disable right now. Maybe Microsoft should have really included a restorebox property to handle this requirement.

7/7/9 11:34 AM

I am thinking of handling the restore event of the form so that no matter the user clicks the restorebox, nothing will happen. How to do that, I will still have to find out.
 
Last edited:
Top Bottom