Center a control (button, textbox, ...) on a form.
Center a control (button, textbox, ...) on a form.
API Declarations
'CenterCtrlX Form1.Command1
'// and / or
'CenterCtrlY Form1.Command1
Rate Center a control (button, textbox, ...) on a form.
(2(2 Vote))
Ctrl.Left = (Me.ScaleWidth - Ctrl.Width) / 2
End Sub
Private Sub CenterCtrlY(Ctrl As Control)
Ctrl.Top = (Me.ScaleHeight - Ctrl.Height) / 2
End Sub
Center a control (button, textbox, ...) on a form. Comments
No comments yet — be the first to post one!
Post a Comment