Private Declare Function GetWindowLong Lib "user32" Alias "GetWindowLongA" (ByVal hwnd As Long, ByVal nIndex As Long) As Long
Private Declare Function SetWindowLong Lib "user32" Alias "SetWindowLongA" (ByVal hwnd As Long, ByVal nIndex As Long, ByVal dwNewLong As Long) As Long
Private Const GWL_STYLE = (-16)
Private Const WS_SYSMENU = &H80000
Private Sub Form_Load()
Dim lStyle As Long
lStyle = GetWindowLong(hwnd, GWL_STYLE) Or WS_SYSMENU
SetWindowLong hwnd, GWL_STYLE, lStyle
End Sub