|
能不能去掉access自身的最小化最大化和关闭按钮?
Henry D. Sy版主在2007年有过这方面的贴,用以下代码去掉了Access自身的关闭按钮,可最小化和最大化按钮没会弄,请高手指教.谢谢!
Henry D. Sy版主的代码是:
Private Declare Function GetSystemMenu Lib "User32" (ByVal hwnd As Long, ByVal bRevert As Long) As Long
Private Declare Function DeleteMenu Lib "User32" (ByVal hMenu As Long, ByVal nPosition As Long, ByVal wFlags As Long) As Long
Private Sub FORM_Load()
Const MF_BYCOMMAND = &H0&
Const SC_CLOSE = &HF060 ''恢复按钮的ID是:&HF120
Dim hMenu As Long
hMenu = GetSystemMenu(Application.hWndaccessApp, 0)
Call DeleteMenu(hMenu, SC_CLOSE, MF_BYCOMMAND)
End Sub |
|