|
小弟前些日子在access交流中心看到一个隐藏主窗口的帖子,我照着作了,果然可以,非常得帅,不过遗憾的是它连其它的窗体及表都一块儿隐藏了,各位都是高手,请帮我看看有没有办法让其它的窗体和表能够打开!以下是 huang59 写的原文:
建立一个模块,代码如下:
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
Private Sub Form_Unload(Cancel As Integer)
DoCmd.Quit acQuitSaveNone
End Sub
注意:启动窗体属性--其他--弹出方式--设成是 |
本帖子中包含更多资源
您需要 登录 才可以下载或查看,没有帐号?注册
x
|