This is the code to align the content of a Panel in the Center, Hope this Helps :)

Edited 1 Year Ago by iPoor

'You Will need 1 Panel Control and 1 PictureBox Control inside the Panel Control
Public Class Form1

    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        Panel1.AutoScroll = True
        'Tell the Panel Control 
        'to show ScrollBars when the
        'controls Are out of the Panel's Visible Boundaries
    End Sub

    Private Sub Form1_Resize(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Resize
        Panel1.Width = Me.Width - 50
        Panel1.Height = Me.Height - 70
'This is the Main PART!!!
        PictureBox1.Top = Panel1.Height / 2 - PictureBox1.Height / 2
        PictureBox1.Left = Panel1.Width / 2 - PictureBox1.Width / 2
    End Sub
End Class

PictureBox1.Top = Panel1.Height / 2 - PictureBox1.Height / 2
PictureBox1.Left = Panel1.Width / 2 - PictureBox1.Width / 2

you can do it as

PictureBox1.Top = (Panel1.Height  - PictureBox1.Height) / 2
PictureBox1.Left = (Panel1.Width  - PictureBox1.Width) / 2