MDI Minimized Form
Private Sub MDIForm_Resize()
' minimum width and height of the form
Const conMinHeight = 3000
Const conMinWidth = 9000
' differentials between the flexgrid and the
' forms dimensions
Const conFlxWidthDiff = 240
Const conflxHeightDiff = 1200
Dim lngFormWidth As Long
Dim lngFormHeight As Long
With Me
' determine the dimensions of the form
lngFormWidth = .Width
If lngFormWidth < conMinWidth Then
lngFormWidth = conMinWidth
End If
lngFormHeight = .Height
If lngFormHeight < conMinHeight Then
lngFormHeight = conMinHeight
End If
If Not ((Me.WindowState = vbMaximized) Or (Me.WindowState = vbMinimized)) Then
' set form dimensions
.Width = lngFormWidth
.Height = lngFormHeight
End If
End With
' set flexgrid dimensions
'With flx
'.Width = lngFormWidth - conFlxWidthDiff
'.Height = lngFormHeight - conflxHeightDiff
'End With
End Sub ' Form_Resize
Komentar
Posting Komentar