ACCESS中的窗体虽然设置了自动居中,但是打开后总是有点不居中的感觉,加下如下代码可以做到真正居中显示 Private Sub Form_Load() DoCmd.Echo False Dim x, y As Integer DoCmd.Maximize x = Me.WindowWidth y = Me.WindowHeight DoCmd.Restore DoCmd.Echo True Move (x - Me.WindowWidth) / 2, (y - Me.WindowHeight) / 2 End Sub |
|站长邮箱|小黑屋|手机版|Office中国/Access中国
( 粤ICP备10043721号-1 )
GMT+8, 2025-4-2 12:13 , Processed in 0.078012 second(s), 23 queries .
Powered by Discuz! X3.3
© 2001-2017 Comsenz Inc.