设为首页收藏本站Access中国

Office中国论坛/Access中国论坛

 找回密码
 注册

QQ登录

只需一步,快速开始

返回列表 发新帖
查看: 4423|回复: 8
打印 上一主题 下一主题

如何让Access父窗体(主窗体)位于任何windows窗体的前面?

[复制链接]
1#
发表于 2010-8-25 22:39:31 | 显示全部楼层
本帖最后由 lkkl66 于 2010-8-25 22:43 编辑

回复 David.cn 的帖子

Private Declare Function SetWindowPos Lib "user32" _
    (ByVal hwnd As Long, ByVal hWndInsertAfter As Long, _
   ByVal X As Long, ByVal y As Long, ByVal cx As Long, _
   ByVal cy As Long, ByVal wFlags As Long) As Long
    在窗体加载事件:
=================================
Private Sub Form_Load()   
DoCmd.RunCommand acCmdAppMinimize     '登录时的窗口突出化
SetWindowPos Me.hwnd, -1, 0, 0, 0, 0, 3 '登录时的窗口置前
SetWindowPos Me.hwnd, -2, 0, 0, 0, 0, 3 '马上恢复正常
End Sub
==========================
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2024-5-21 14:50 , Processed in 0.094864 second(s), 23 queries .

Powered by Discuz! X3.3

© 2001-2017 Comsenz Inc.

快速回复 返回顶部 返回列表