DelMinMaxBtn



Sub MDIForm_Load()
Dim lWnd as Long
lWnd = GetWindowLong(Me.hWnd, GWL_STYLE)
lWnd = lWnd And Not (WS_MINIMIZEBOX)
lWnd = lWnd And Not (WS_MAXIMIZEBOX)
lWnd = SetWindowLong(Me.hWnd, GWL_STYLE, lWnd)
End Sub

'Add this code (which includes the required API declarations) to a BAS module:

#If Win32 Then
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
#Else
Declare Function SetWindowLong Lib "User" (ByVal hwnd _
As Integer, ByVal nIndex As Integer, ByVal _
dwNewLong As Long) As Long
Declare Function GetWindowLong Lib "User" (ByVal hwnd _
As Integer, ByVal nIndex As Integer) As Long
#End If
Const WS_MINIMIZEBOX = &H20000
Const WS_MAXIMIZEBOX = &H10000
Const GWL_STYLE = (-16)
----------------------------------------------------------------------------------------------------------

(delminmaxbtn.html)- by Paolo Puglisi - Modifica del 25/3/2019