窗体只剩最小化
vb编程乐园吧
全部回复
仅看楼主
level 6
刘福兴 楼主
'添加 Command1Private Declare Function GetWindowLong Lib "user32" Alias "GetWindowLongA" (ByVal hwnd As Long, ByVal nIndex As Long) As LongPrivate Declare Function SetWindowLong Lib "user32" Alias "SetWindowLongA" (ByVal hwnd As Long, ByVal nIndex As Long, ByVal dwNewLong As Long) As LongPrivate Declare Function GetSystemMenu Lib "user32" (ByVal hwnd As Long, ByVal bRevert As Long) As LongPrivate Declare Function RemoveMenu Lib "user32" (ByVal hMenu As Long, ByVal nPosition As Long, ByVal wFlags As Long) As LongConst MF_BYPOSITION = &H400&Const MF_REMOVE = &H1000&Sub Form_Load() Dim hSysMenu As Long Dim r%, j%, dw&, rr& Const MF_BYPOSITION = &H400 hSysMenu = GetSystemMenu(Me.hwnd, 0) For j = 8 To 4 Step -1 r = RemoveMenu(hSysMenu, j, MF_BYPOSITION) Next j dw& = GetWindowLong(Me.hwnd, -16) 'Window style dw& = dw& And &HFFFEFFFF 'Turn off bits for Maximize arrow button rr& = SetWindowLong(Me.hwnd, -16, dw&) Command1.Caption = "退出"End SubPrivate Sub Command1_Click() EndEnd Sub 
2008年03月30日 07点03分 1
level 13
不懂唉...
2009年05月13日 01点05分 2
1