' Project PictureBoxes ' Change the Left, Top, Width, Height and BackColor properties of ' picture boxes at runtime. Public Class Form1 Inherits System.Windows.Forms.Form #Region " Windows Form Designer generated code " Public Sub New() MyBase.New() 'This call is required by the Windows Form Designer. InitializeComponent() 'Add any initialization after the InitializeComponent() call End Sub 'Form overrides dispose to clean up the component list. Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean) If disposing Then If Not (components Is Nothing) Then components.Dispose() End If End If MyBase.Dispose(disposing) End Sub 'Required by the Windows Form Designer Private components As System.ComponentModel.IContainer 'NOTE: The following procedure is required by the Windows Form Designer 'It can be modified using the Windows Form Designer. 'Do not modify it using the code editor. Friend WithEvents picA As System.Windows.Forms.PictureBox Friend WithEvents picB As System.Windows.Forms.PictureBox Friend WithEvents picC As System.Windows.Forms.PictureBox Private Sub InitializeComponent() Me.picA = New System.Windows.Forms.PictureBox Me.picB = New System.Windows.Forms.PictureBox Me.picC = New System.Windows.Forms.PictureBox Me.SuspendLayout() ' 'picA ' Me.picA.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle Me.picA.Location = New System.Drawing.Point(48, 24) Me.picA.Name = "picA" Me.picA.Size = New System.Drawing.Size(64, 64) Me.picA.TabIndex = 0 Me.picA.TabStop = False ' 'picB ' Me.picB.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle Me.picB.Location = New System.Drawing.Point(80, 56) Me.picB.Name = "picB" Me.picB.Size = New System.Drawing.Size(64, 64) Me.picB.TabIndex = 1 Me.picB.TabStop = False ' 'picC ' Me.picC.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle Me.picC.Location = New System.Drawing.Point(112, 88) Me.picC.Name = "picC" Me.picC.Size = New System.Drawing.Size(64, 64) Me.picC.TabIndex = 2 Me.picC.TabStop = False ' 'Form1 ' Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13) Me.ClientSize = New System.Drawing.Size(292, 266) Me.Controls.Add(Me.picC) Me.Controls.Add(Me.picB) Me.Controls.Add(Me.picA) Me.Name = "Form1" Me.Text = "PictureBoxes Example" Me.ResumeLayout(False) End Sub #End Region Private Sub Form1_Load(ByVal sender As System.Object, _ ByVal e As System.EventArgs) Handles MyBase.Load ' Set properties for picA picA.Left = 20 picA.Top = 20 picA.Width = 200 picA.Height = 200 picA.BackColor = Color.White ' Set properties for picB picB.Left = 40 picB.Top = 40 picB.Width = 160 picB.Height = 160 picB.BackColor = Color.Blue ' Set properties for picC picC.Left = 60 picC.Top = 60 picC.Width = 120 picC.Height = 120 picC.BackColor = Color.Red ' Set background color of form to black. Me.BackColor = Color.Black End Sub End Class