Declare Function IsZoomed Lib "user32.dll" (ByVal hwnd As Long) As Long
Platforms: Win 32s, Win 95/98, Win NT
IsZoomed finds if a given window is maximized or not. The function returns 0 if the window is not maximized (it could be either restored or minimized); it returns a non-zero value if the window is maximized.
Example:
' Determine if the window Form1 is maximized, minimized, or restored. Dim minflag As Long, maxflag As Long ' receive minimized or maximized status minflag = IsIconic(Form1.hWnd) ' is Form1 minimized? maxflag = IsZoomed(Form1.hWnd) ' is Form1 maximized? If minflag <> 0 Then Debug.Print "Form1 is minimized." Elseif maxflag <> 0 Then Debug.Print "Form1 is maximized." Else Debug.Print "Form1 is restored." End If
See Also: IsIconic, ShowWindow
Category: Windows
Go back to the alphabetical Function listing.
Go back to the Reference section index.
This page is copyright © 2000 Paul Kuliniewicz. Copyright Information.
Go back to the Windows API Guide home page.
E-mail: vbapi@vbapi.com Send Encrypted E-Mail
This page is at http://www.vbapi.com/ref/i/iszoomed.html