设为首页收藏本站Access中国

Office中国论坛/Access中国论坛

 找回密码
 注册

QQ登录

只需一步,快速开始

优化 DoCmd.RunCommand acCmdAppMinimize

2008-2-15 16:36| 发布者: andymark| 查看: 882| 评论: 5

把启动窗体设为弹出模式并在窗体加载事件中加入DoCmd.RunCommand acCmdAppMinimize 就能对数据库进行隐藏。大家可能也碰到过这样的情况,同样的代码同样是弹出模式,主窗体为何有时是缩少到最小化,有时却能正常显示呢?先不说原因,下面的代码也许对你有所帮助 Private Declare Function SetForegroundWindow Lib "user32" (ByVal hWnd As Long) As Long Private Declare Function ShowWindow Lib "user32" (ByVal hWnd As Long, ByVal nCmdShow As Long) As Long Const SW_SHOWNORMAL = 1 Private Sub Form_Load() DoCmd.RunCommand acCmdAppMinimize SetForegroundWindow Me.hWnd ShowWindow Me.hWnd, SW_SHOWNORMAL Me.SetFocus End Sub详细内容:http://www.office-cn.net/forum.php?mod=viewthread&tid=59655
发表评论

最新评论

查看全部评论(5)

QQ|站长邮箱|小黑屋|手机版|Office中国/Access中国 ( 粤ICP备10043721号-1 )  

GMT+8, 2024-4-29 13:18 , Processed in 0.071572 second(s), 16 queries .

Powered by Discuz! X3.3

© 2001-2017 Comsenz Inc.

返回顶部