Detecting if an access form is maximized

  • Thread starter Thread starter Van T. Dinh
  • Start date Start date
V

Van T. Dinh

You can use the WinAPI IsZoomed().

In a Standard Module, add the following declaration:

Declare Function IsZoomed Lib "user32" ( _
ByVal hwnd As Long) As Long

You can then check whether the Form Object F is maximized
or not by:

If IsZoomed(F.hwnd) <> 0 Then
'Form F is maximized
Else
'Form F is not maximized.
End If

HTH
Van T. Dinh
MVP (Access)
 
Back
Top