P°idßnφ tlaΦφtka Min na Fixed formulß°

Postup:
Zalo₧te nov² projekt. Formulß°i nastavte vlastnost BorderStyle na Fixed. Do deklaraΦnφ Φßsti formulß°e zapiÜte:

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_MINIMIZEBOX = &H20000
Private Const WS_MAXIMIZEBOX = &H10000

Private Function AddMinimizeButton(po_Form As Form)

   Dim ll_Style As Long

   ll_Style = GetWindowLong(po_Form.hwnd, GWL_STYLE)
   Call SetWindowLong(po_Form.hwnd, GWL_STYLE, ll_
    Style Or WS_MINIMIZEBOX)

End Function
  
Na udßlost Form_Load p°idejte volßnφ funkce:
Private Sub Form_Load()

    AddMinimizeButton Me

End Sub

Zp∞t

Autor: The Bozena