|
8#
楼主 |
发表于 2017-3-9 14:58:08
|
只看该作者
本帖最后由 wuheng 于 2017-3-9 15:00 编辑
有些语句用到了Option Compare Database
Private Declare Function GetVolumeInformation Lib _
"kernel32.dll" Alias "GetVolumeInformationA" (ByVal _
lpRootPathName As String, ByVal lpVolumeNameBuffer As _
String, ByVal nVolumeNameSize As Integer, _
lpVolumeSerialNumber As Long, lpMaximumComponentLength _
As Long, lpFileSystemFlags As Long, ByVal _
lpFileSystemNameBuffer As String, ByVal _
nFileSystemNameSize As Long) As Long
Option Compare Database
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
Dim hMenu As Long
hMenu = GetSystemMenu(Application.hWndAccessApp, 0)
Call DeleteMenu(hMenu, SC_CLOSE, MF_BYCOMMAND) '屏蔽主窗口的关闭按钮
End Sub
|
|