|
ユーザーフォームのモジュールに書いて下さい。
最小化などのボタンが表示されます。
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 GetActiveWindow Lib "user32" () As Long
Private Declare Function DrawMenuBar Lib "user32" (ByVal hwnd As Long) As Long
Private Const GWL_STYLE = (-16)
Private Const WS_THICKFRAME = &H40000
Private Sub UserForm_Activate()
Dim Ret As Long
Dim hwnd As Long
Dim Wnd_STYLE As Long
hwnd = GetActiveWindow()
Wnd_STYLE = GetWindowLong(hwnd, GWL_STYLE)
Wnd_STYLE = Wnd_STYLE Or WS_THICKFRAME Or &H30000
Ret = SetWindowLong(hwnd, GWL_STYLE, Wnd_STYLE)
DrawMenuBar hwnd
End Sub
|
|