Private Declare Function SetWindowLong Lib "user32" Alias _
"SetWindowLongA" (ByVal hwnd As Long, _
ByVal nIndex As Long, ByVal dwNewLong As Long) As Long
Private Declare Function GetWindowLong Lib "user32" Alias "GetWindowLongA" _
(ByVal hwnd As Long, ByVal nIndex As Long) As Long
Const WS_THICKFRAME = &H40000
Const WS_MINIMIZEBOX = &H20000
Const WS_MAXIMIZEBOX = &H10000
Const WS_SYSMENU = &H80000
Const GWL_STYLE = (-16)
Private Sub MDIForm_Load()
SetWindowLong Me.hwnd, GWL_STYLE, GetWindowLong(Me.hwnd, _
GWL_STYLE) And Not (WS_SYSMENU Or WS_THICKFRAME Or WS_MINIMIZEBOX Or WS_MAXIMIZEBOX)
End Sub
L'unica cosa e che i tasti(compreso quello di chiusura) non vengono disabilitati ma tolti