此方法须把启动窗口设置为弹出属性。所以不适用所有的数据库。其方法是在启动窗体的加载属性中加入如下代码 DoCmd.RunCommand acCmdAppMinimize'最小化ACCESS窗体 方法二------------------------------ 1、定义以下变量 Option Compare Database Option Explicit Private Declare Function ShowCursor Lib "user32" (ByVal bShow As Long) As Long Const WM_SYSCOMMAND As Long = &H112 Const SC_MOVE_MOUSE As Long = &HF012& Private Declare Function ShowWindow Lib "user32" _ (ByVal hwnd As Long, ByVal nCmdShow As Long) As Long 2、在启动窗体中键入以下代码并把启动窗体的弹出属性设为是 Private Sub Form_Load() ShowWindow Me.Application.hWndAccessApp, 0 End Sub 要隐藏数据库窗口,使用以下代码: DoCmd.SelectObject acForm, "你的窗体名", True DoCmd.RunCommand acCmdWindowHide 要最小化数据库窗口,使用以下代码: DoCmd.SelectObject acForm, , True DoCmd.Minimize |
|站长邮箱|小黑屋|手机版|Office中国/Access中国
( 粤ICP备10043721号-1 )
GMT+8, 2025-4-4 05:17 , Processed in 0.081211 second(s), 17 queries .
Powered by Discuz! X3.3
© 2001-2017 Comsenz Inc.