Const GWL_EXSTYLE = -20
Const GWL_HINSTANCE = -6
Const GWL_HWNDPARENT = -8
Const GWL_ID = -12
Const GWL_STYLE = -16
Const GWL_USERDATA = -21
Const GWL_WNDPROC = -4
Const DWL_DLGPROC = 4
Const DWL_MSGRESULT = 0
Const DWL_USER = 8
در ویندوز ۳۲ بیتی :
Public Declare Function GetWindowLong Lib "user32.dll" Alias GetWindowLongA" (ByVal hWnd
As Long,ByVal nIndex As Long) As Long
Public Const GWL_STYLE=-16
Public Const WS_MAXIMIZEBOX= &H10000
()Private Sub Command1_Click
Dim styles As Long
receives window styles of Form1'
Get the window styles of Form1'
(styles=GetWindowLong(Me.hWnd,GWL_STYLE
Determine if a maximize box exists or not'
If (styles And WS_MAXIMIZEBOX)= WS_MAXIMIZEBOX Then
".Debug.Print "The form window has a maximize box
Else
Debug.Print "The form window does not have a
".maximize box
End If
End Sub