怎样使窗体最大化的按钮无效,或实现其他功能?
我只会用RESIZE做
不过效果是先变大一下再回来
然后才。。。
有没有不用API的方法?
不是太明白你的意思..
怎样使窗体最大化的按钮无效
Option Explicit
Private Declare Function GetSystemMenu Lib "user32" (ByVal hwnd As Long, ByVal bRevert As Long) As Long
Private Declare Function RemoveMenu Lib "user32" (ByVal hMenu As Long, ByVal nPosition As Long, ByVal wFlags As Long) As Long
Private Const SC_CLOSE = &HF060&
Private Const MF_REMOVE = &H1000&
Private Sub Command1_Click()
Dim hMenu As Long
hMenu = GetSystemMenu(Form1.hwnd, 0)
If hMenu <> 0 Then
RemoveMenu hMenu, SC_CLOSE, MF_REMOVE
End If
End Sub