Example:
Me.WindowState = 0
Me.Width = Your_Default_Width (sample set your MDIform Property: Width:10860)
Me.Height = Your_Default_Height (sample set your MDIform Property: Height :7980)
Like this one:
Me.WindowState = 0
Me.Width = 10860
Me.Height = 7980
1. Change your WindowState in MDIform Property to 2-Maximized
2. Then Resize your MDI form the default that you like.
3. Put this code in your MDIform:
CODE:
Private Sub MDIForm_Resize()
If Me.WindowState = 0 Then
Me.WindowState = 0 'Normal
Me.Width = 10860
Me.Height = 7980
ElseIf Me.WindowState = 2 Then 'Maximized Property
Me.WindowState = 0 'Normal
Me.Width = 10860
Me.Height = 7980
End If
End Sub
This keeps the form in the normal windowstate and doesn't allow the user to change its size. The maximize button box is still visible and trying to change the form's size will briefly work, but the above code quickly intervenes and sets the windowstate and size to the default value.
I don't know how to disabled the maximized button and I'm also want to do it. I'm only a beginner using this Program (vb6). But I love Coding using it. I hope it may help you. Enjoy :) God bless..
pnxstan23
No comments:
Post a Comment