huji
asked on
MDI Child always maximized
I want an MDI child to appear as maximised. Here is what I do:
Private Sub frmList_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
Me.WindowState = FormWindowState.Maximized
End Sub
Now, I want to prevent the user from restoring it to normal size. How can I do that?
Private Sub frmList_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
Me.WindowState = FormWindowState.Maximized
End Sub
Now, I want to prevent the user from restoring it to normal size. How can I do that?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
or set the form border to Fixed and user will not be able to resize it. you could also dissapear the minimize and restore buttons via the properties in the design time of the form
ASKER
>> you could also dissapear the minimize and restore buttons via the properties in the design time of the form
This makes the maximize button of a normal sized form to disappear, but doesn't make the "restore" button of a maximized for to disappear!!
>> set the form border to Fixed
That didn't herlp either!!
>>try handling the Form Resize event and put the same code
Me.WindowState = FormWindowState.Maximized
I need to maximize the form in the beginning. I do it in the Load even handler. Using the same sub to handle Resize made the Load not to function properly about maximizing the form. However, setting up a different handler made the trick.
Thanks
Huji
This makes the maximize button of a normal sized form to disappear, but doesn't make the "restore" button of a maximized for to disappear!!
>> set the form border to Fixed
That didn't herlp either!!
>>try handling the Form Resize event and put the same code
Me.WindowState = FormWindowState.Maximized
I need to maximize the form in the beginning. I do it in the Load even handler. Using the same sub to handle Resize made the Load not to function properly about maximizing the form. However, setting up a different handler made the trick.
Thanks
Huji