Public Class Form1 Public WithEvents Shape1 As Microsoft.VisualBasic.PowerPacks.RectangleShape Protected Overrides Sub OnLoad(e As EventArgs) Me.Shape1 = New Microsoft.VisualBasic.PowerPacks.RectangleShape() Me.Shape1.BackColor = System.Drawing.Color.FromArgb(CType(CType(255, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(192, Byte), Integer)) Me.Shape1.BackStyle = Microsoft.VisualBasic.PowerPacks.BackStyle.Opaque Me.Shape1.BorderColor = System.Drawing.SystemColors.WindowText Me.Shape1.FillColor = System.Drawing.Color.Black Me.Shape1.Location = New System.Drawing.Point(200, 500) Me.Shape1.Name = "Shape1" Me.Shape1.Size = New System.Drawing.Size(100, 100) Dim ShapeContainer1 As New Microsoft.VisualBasic.PowerPacks.ShapeContainer() ShapeContainer1.Shapes.Add(Me.Shape1) Me.Controls.Add(ShapeContainer1) MyBase.OnLoad(e) End Sub End Class