I have no problem allowing resizing MDIForm ?
I encountered no problems when resizing allows MDIForm, when running this code below:
Code:
Private mHeight As Long, mWidth As Long
Private Sub MDIForm_Load()
mHeight = Me.Height
mWidth = Me.Width
End Sub
'disable mdi form resize
Private Sub MDIForm_Resize()
Me.WindowState = 0 'Normal
Me.Height = mHeight
Me.Width = mWidth
End Sub
when I press MinButton of MIDIForm not. can change the code above to just have two functions: do not allow to resize and allow MinButton (or allow MaxButton) of MDIForm it ?
Re: I have no problem allowing resizing MDIForm ?
There is no mode on a MDI form to prevent resizing.
You could add code in the form_resize event to override any change made by the user but you need to make sure that your code only tries to override when the windowstate is normal else it will not allow the other operations and may give a run time error when min or max is clicked.
Often when using a MDI parent I will set the size of the form to the workarea size and allow only min or max operations