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?
LVL 14
hujiAsked:
Who is Participating?
 
newyuppieConnect With a Mentor Commented:
try handling the Form Resize event and put the same code
Me.WindowState = FormWindowState.Maximized

in there.
0
 
newyuppieCommented:
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
0
 
hujiAuthor Commented:
>> 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
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.