|
隐藏主窗体——一样的代码为什么什么也不显示!
这段代码是黄帮主的“隐藏ACCESS主窗体”示例里的代码。但是放到我的窗体里,为什么就全部都隐藏了呢?包括需要显示的窗体。
Option Compare Database
Global Const SW_HIDE = 0
Global Const SW_SHOWNORMAL = 1
Global Const SW_SHOWMINIMIZED = 2
Global Const SW_SHOWMAXIMIZED = 3
Private Declare Function apiShowWindow Lib "user32" _
Alias "ShowWindow" (ByVal hwnd As Long, _
ByVal nCmdShow As Long) As Long
Function fSetAccessWindow(nCmdShow As Long)
Dim loX As Long
Dim loForm As Form
On Error Resume Next
loX = apiShowWindow(hWndAccessApp, nCmdShow)
Err.Clear
fSetAccessWindow = (loX <> 0)
End Function
Private Sub Form_Load()
fSetAccessWindow (SW_HIDE)
DoCmd.Restore
End Sub
[em06][em06][em06] |
|