I've used this simple function to prevent resizing or allowing resizing. Depends what you want to do.
You set the variables to whatever you want. Can prevent resizing, or you can addCode:'in the declaration part of a form Dim lngHeight, lngWidth As Long 'After the declarations Private Sub Form_Resize() Resizer lngHeight, lngWidth 'Call the resize function End Sub Private Function Resizer(ByVal lngHi As Long, ByVal lngWid As Long) If WindowState < 1 Or WindowState > 2 Then 'VB will call the resize event when minimizing 'or Maximizing; you cannot resize a form in these 'states, so skip Form1.Height = lngHi Form1.Width = lngWid End If
more code to adjust the variables
to do anything you want. Has no recursive side-effects (that I know of!)




Reply With Quote