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.5, (y - Me.WindowHeight) / 3
End Sub

posted @ 2018-05-01 13:43  黑旗君  阅读(577)  评论(0)    收藏  举报