UserForm1.Hide
End SubPrivate Sub UserForm_Click()
aa = FindWindow("ThunderDFrame", Me.Caption)
bb = GetWindowLong(aa, GWL_STYLE)
bb = bb And Not WS_CAPTION
SetWindowLong aa, GWL_STYLE, bb
DrawMenuBar aa
Me.Width = Application.Width + 5
Me.Height = Application.Height + 5
Me.Top = 0
Me.Left = 0
End Sub模組程式碼為Public Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
Public Declare Function GetWindowLong Lib "user32" Alias "GetWindowLongA" (ByVal hWnd As Long, ByVal nIndex As Long) As Long
Public Declare Function SetWindowLong Lib "user32" Alias "SetWindowLongA" (ByVal hWnd As Long, ByVal nIndex As Long, ByVal dwNewLong As Long) As Long
Public Declare Function DrawMenuBar Lib "user32" (ByVal hWnd As Long) As Long
Public Const GWL_STYLE As Long = (-16)
Public Const WS_CAPTION As Long = &HC00000
UserForm1.Hide
End SubPrivate Sub UserForm_Click()
aa = FindWindow("ThunderDFrame", Me.Caption)
bb = GetWindowLong(aa, GWL_STYLE)
bb = bb And Not WS_CAPTION
SetWindowLong aa, GWL_STYLE, bb
DrawMenuBar aa
Me.Width = Application.Width + 5
Me.Height = Application.Height + 5
Me.Top = 0
Me.Left = 0
End Sub模組程式碼為Public Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
Public Declare Function GetWindowLong Lib "user32" Alias "GetWindowLongA" (ByVal hWnd As Long, ByVal nIndex As Long) As Long
Public Declare Function SetWindowLong Lib "user32" Alias "SetWindowLongA" (ByVal hWnd As Long, ByVal nIndex As Long, ByVal dwNewLong As Long) As Long
Public Declare Function DrawMenuBar Lib "user32" (ByVal hWnd As Long) As Long
Public Const GWL_STYLE As Long = (-16)
Public Const WS_CAPTION As Long = &HC00000