|
本帖最后由 xyxj1974 于 2009-8-26 15:27 编辑
在程序开始的窗体里加入:
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 |
|