CenterForm32




' Center the desired form on the screen

Sub CenterFrm (aForm As Form)
Dim x, y
x = (Screen.Width - aForm.Width) / 2
y = (Screen.Height - aForm.Height) / 2
aForm.Move x, y
End Sub

' Example:

CenterFrm Form1










( centerform32.html )- by Paolo Puglisi - Modifica del 17/12/2023