PotlaΦenφ Min a Max tlaΦφtek na MDI formulß°i

Postup:
V deklaraΦnφ Φßsti formulß°e zapiÜte:

Private Const WS_MINIMIZEBOX = &H20000
Private Const WS_MAXIMIZEBOX = &H10000
Private Const GWL_STYLE = (-16)

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

Na udßlost MDIForm_Load:

Private Sub MDIForm_Load()

  Dim L as Long

  L = GetWindowLong(Me.hWnd, GWL_STYLE)
  L = L And Not (WS_MINIMIZEBOX)
  L = L And Not (WS_MAXIMIZEBOX)
  L = SetWindowLong(Me.hWnd, GWL_STYLE, L)

End Sub

Zp∞t

Autor: The Bozena