I know this is an old post, and this does not answer the question directly, but for anyone who stumbles upon this topic, centering the form can be done simply without the need to write your own procedure.
System.Windows.Forms.Form.CenterToScreen() and System.Windows.Forms.Form.CenterToParent() allow you to center the form using a link to the screen or a link to the parent form, depending on which one you need,
It should be noted that these procedures MUST be called before the form is loaded. It is best to call them in the form_load event handler.
EXAMPLE CODE:
Private Sub Settings_Load(sender As Object, e As EventArgs) Handles Me.Load Me.CenterToScreen() 'or you can use Me.CenterToParent() End Sub
mike100111
source share