本帖最后由 爱疯 于 2011-10-14 20:57 编辑
Private Declare Function DrawMenuBar Lib "user32" (ByVal hwnd As Long) 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 FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long Private Const GWL_STYLE As Long = (-16) Private Const WS_CAPTION As Long = &HC00000
Private Sub UserForm_Initialize() hwnd = FindWindow("ThunderDFrame", Me.Caption) SetWindowLong hwnd, GWL_STYLE, IStyle DrawMenuBar hwnd End Sub
API相对来说代码很少了(只有几行),不必理解,拿来就用[em01]
[hide]
BoxBMBn8.rar
(9.28 KB, 下载次数: 250)
|