access窗口标签居中

Private Sub Form_Resize()
On Error Resume Next
Me.Width = Me.InsideWidth
Me.Section(acDetail).Height = Me.InsideHeight
Me.Label_u.Move (Me.InsideWidth - (Me.login.Left + Me.login.Width - Me.Label_u.Left)) / 2.3, (Me.InsideHeight - Me.login.Height) / 2.5
Me.Label_u.Move Me.Label_u.Left + 15, Me.Label_u.Top - 50
Me.Label_p.Move Me.Label_p.Left, Me.Label_p.Top + Me.login.Height - Me.password.Height
Me.Label_p.Move Me.Label_p.Left + 15, Me.Label_p.Top - 50
Me.username.Move Me.Label_u.Left + Me.Label_u.Width, Me.Label_p.Top
Me.password.Move Me.username.Left, Me.Label_p.Top

end sub

原文地址:https://www.cnblogs.com/ince/p/8996165.html