Cytat:
> ale niestety jest to dla mnie zbyt trudne
Dla mnie też,
ale znalazłem kod przystosowany przez pxd74.
Udostępniony jest przycisk "Minimalizuj" i "przywrócenie...".
Kod należy wkleić w module formularza.
'Deklaracje API
Private Declare Function FindWindow Lib "user32" _
Alias "FindWindowA" _
(ByVal lpClassName As String, _
ByVal lpWindowName As String) _
As Long
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 Declare Function DrawMenuBar Lib "user32" _
(ByVal hWnd As Long) _
As Long
Private Const GWL_STYLE As Long = (-16)
Private Const WS_MINIMIZEBOX As Long = &H20000
Private Sub UserForm_Activate()
Dim iStyle As Long
Dim hWndForm As Long
hWndForm = FindWindow(vbNullString, Me.Caption)
iStyle = GetWindowLong(hWndForm, GWL_STYLE)
iStyle = iStyle Or WS_MINIMIZEBOX
SetWindowLong hWndForm, GWL_STYLE, iStyle
DrawMenuBar hWndForm
End Sub
--
Pozdrawiam
Stanislaw |