LISTING 1: The code that defines the control form. VS.NET generates this type of layout code automatically when you add controls to a form. The code also shows the autogenerated initialization and disposal methods.

   #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
   Friend WithEvents tbRows As System.Windows.Forms.TrackBar
   Friend WithEvents tbColumns As System.Windows.Forms.TrackBar
   Friend WithEvents tbSpeed As System.Windows.Forms.TrackBar
   Friend WithEvents Label1 As System.Windows.Forms.Label
   Friend WithEvents Label2 As System.Windows.Forms.Label
   Friend WithEvents Label3 As System.Windows.Forms.Label
   Friend WithEvents lblRows As System.Windows.Forms.Label
   Friend WithEvents lblColumns As System.Windows.Forms.Label
   Friend WithEvents Label5 As System.Windows.Forms.Label
   Friend WithEvents lblSpeed As System.Windows.Forms.Label
   Friend WithEvents btnSanta_Smacked As _
      System.Windows.Forms.Button
   Friend WithEvents btnSanta As System.Windows.Forms.Button
   Friend WithEvents btnSmackHim As System.Windows.Forms.Button
   
   'Required by the Windows Form Designer
   Private components As System.ComponentModel.Container
   
   '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.
   <System.Diagnostics.DebuggerStepThrough()> _
   Private Sub InitializeComponent()
      Dim resources As System.Resources.ResourceManager = _
         New System.Resources.ResourceManager _
            (GetType(frmSetup))
      Me.Label5 = New System.Windows.Forms.Label()
      Me.lblRows = New System.Windows.Forms.Label()
      Me.tbColumns = New System.Windows.Forms.TrackBar()
      Me.Label1 = New System.Windows.Forms.Label()
      Me.lblColumns = New System.Windows.Forms.Label()
      Me.Label3 = New System.Windows.Forms.Label()
      Me.Label2 = New System.Windows.Forms.Label()
      Me.btnSmackHim = New System.Windows.Forms.Button()
      Me.lblSpeed = New System.Windows.Forms.Label()
      Me.btnSanta = New System.Windows.Forms.Button()
      Me.tbRows = New System.Windows.Forms.TrackBar()
      Me.btnSanta_Smacked = New System.Windows.Forms.Button()
      Me.tbSpeed = New System.Windows.Forms.TrackBar()
      CType(Me.tbColumns, _
         System.ComponentModel.ISupportInitialize).BeginInit()
      CType(Me.tbRows, _
         System.ComponentModel.ISupportInitialize).BeginInit()
      CType(Me.tbSpeed, _
         System.ComponentModel.ISupportInitialize).BeginInit()
      Me.SuspendLayout()
      '
      'Label5
      '
      Me.Label5.BackColor = System.Drawing.Color.Red
      Me.Label5.BorderStyle = _
         System.Windows.Forms.BorderStyle.Fixed3D
      Me.Label5.Font = New System.Drawing.Font("Comic Sans MS", _
         14.25!, System.Drawing.FontStyle.Bold, _
         System.Drawing.GraphicsUnit.Point, CType(0, Byte))
      Me.Label5.ForeColor = System.Drawing.Color.White
      Me.Label5.Location = New System.Drawing.Point(0, 8)
      Me.Label5.Name = "Label5"
      Me.Label5.Size = New System.Drawing.Size(432, 32)
      Me.Label5.TabIndex = 2
      Me.Label5.Text = "Smack The Santa Control Screen"
      '
      'lblRows
      '
      Me.lblRows.Font = New System.Drawing.Font _
        ("Comic Sans MS", 14.25!, _
        System.Drawing.FontStyle.Italic, _
        System.Drawing.GraphicsUnit.Point, CType(0, Byte))
      Me.lblRows.Location = New System.Drawing.Point(264, 48)
      Me.lblRows.Name = "lblRows"
      Me.lblRows.TabIndex = 1
      Me.lblRows.Text = "3"
      Me.lblRows.TextAlign = _
        System.Drawing.ContentAlignment.MiddleCenter
      '
      'tbColumns
      '
      Me.tbColumns.BackColor = _
         System.Drawing.Color.FromArgb(CType(0, Byte), _
         CType(192, Byte), CType(0, Byte))
      Me.tbColumns.LargeChange = 1
      Me.tbColumns.Location = New System.Drawing.Point(160, 104)
      Me.tbColumns.Maximum = 5
      Me.tbColumns.Minimum = 1
      Me.tbColumns.Name = "tbColumns"
      Me.tbColumns.TabIndex = 0
      Me.tbColumns.Value = 3
      '
      'Label1
      '
      Me.Label1.Font = New System.Drawing.Font("Comic Sans MS", _
         12!, System.Drawing.FontStyle.Bold, _
         System.Drawing.GraphicsUnit.Point, CType(0, Byte))
      Me.Label1.Location = New System.Drawing.Point(40, 48)
      Me.Label1.Name = "Label1"
      Me.Label1.TabIndex = 1
      Me.Label1.Text = "Rows"
      Me.Label1.TextAlign = _
         System.Drawing.ContentAlignment.MiddleRight
      '
      'lblColumns
      '
      Me.lblColumns.Font = New System.Drawing.Font _
         ("Comic Sans MS", 14.25!, _
         System.Drawing.FontStyle.Italic, _
         System.Drawing.GraphicsUnit.Point, CType(0, Byte))
      Me.lblColumns.Location = New System.Drawing.Point(264, 104)
      Me.lblColumns.Name = "lblColumns"
      Me.lblColumns.TabIndex = 1
      Me.lblColumns.Text = "3"
      Me.lblColumns.TextAlign = _
         System.Drawing.ContentAlignment.MiddleCenter
      '
      'Label3
      '
      Me.Label3.Font = New System.Drawing.Font _
         ("Comic Sans MS", 12!, System.Drawing.FontStyle.Bold, _
         System.Drawing.GraphicsUnit.Point, CType(0, Byte))
      Me.Label3.Location = New System.Drawing.Point(40, 160)
      Me.Label3.Name = "Label3"
      Me.Label3.TabIndex = 1
      Me.Label3.Text = "Speed"
      Me.Label3.TextAlign = _
         System.Drawing.ContentAlignment.MiddleRight
      '
      'Label2
      '
      Me.Label2.Font = New System.Drawing.Font _
         ("Comic Sans MS", 12!, System.Drawing.FontStyle.Bold, _
         System.Drawing.GraphicsUnit.Point, CType(0, Byte))
      Me.Label2.Location = New System.Drawing.Point(40, 104)
      Me.Label2.Name = "Label2"
      Me.Label2.TabIndex = 1
      Me.Label2.Text = "Columns"
      Me.Label2.TextAlign = _
         System.Drawing.ContentAlignment.MiddleRight
      '
      'btnSmackHim
      '
      Me.btnSmackHim.BackColor = System.Drawing.Color.Red
      Me.btnSmackHim.Font = New System.Drawing.Font _
         ("Comic Sans MS", 12!, (System.Drawing.FontStyle.Bold _
         Or System.Drawing.FontStyle.Italic), _
         System.Drawing.GraphicsUnit.Point, CType(0, Byte))
      Me.btnSmackHim.ForeColor = System.Drawing.Color.White
      Me.btnSmackHim.Location = _
         New System.Drawing.Point(160, 208)
      Me.btnSmackHim.Name = "btnSmackHim"
      Me.btnSmackHim.Size = New System.Drawing.Size(112, 40)
      Me.btnSmackHim.TabIndex = 3
      Me.btnSmackHim.Text = "Smack Him!"
      '
      'lblSpeed
      '
      Me.lblSpeed.Font = New System.Drawing.Font _
         ("Comic Sans MS", 11.25!, _
         System.Drawing.FontStyle.Italic, _
         System.Drawing.GraphicsUnit.Point, CType(0, Byte))
      Me.lblSpeed.Location = New System.Drawing.Point(264, 160)
      Me.lblSpeed.Name = "lblSpeed"
      Me.lblSpeed.Size = New System.Drawing.Size(152, 23)
      Me.lblSpeed.TabIndex = 1
      Me.lblSpeed.Text = "Sneaky Elf"
      Me.lblSpeed.TextAlign = _
         System.Drawing.ContentAlignment.MiddleCenter
      '
      'btnSanta
      '
      Me.btnSanta.Image = _
         CType(resources.GetObject("btnSanta.Image"), _
         System.Drawing.Bitmap)
      Me.btnSanta.Location = New System.Drawing.Point(296, 152)
      Me.btnSanta.Name = "btnSanta"
      Me.btnSanta.Size = New System.Drawing.Size(100, 100)
      Me.btnSanta.TabIndex = 4
      Me.btnSanta.Visible = False
      '
      'tbRows
      '
      Me.tbRows.BackColor = _
         System.Drawing.Color.FromArgb(CType(0, Byte), _
         CType(192, Byte), CType(0, Byte))
      Me.tbRows.LargeChange = 1
      Me.tbRows.Location = New System.Drawing.Point(160, 48)
      Me.tbRows.Maximum = 5
      Me.tbRows.Minimum = 1
      Me.tbRows.Name = "tbRows"
      Me.tbRows.TabIndex = 0
      Me.tbRows.Value = 3
      '
      'btnSanta_Smacked
      '
      Me.btnSanta_Smacked.Image = _
         CType(resources.GetObject("btnSanta_Smacked.Image"), _
         System.Drawing.Bitmap)
      Me.btnSanta_Smacked.Location = _
         New System.Drawing.Point(16, 152)
      Me.btnSanta_Smacked.Name = "btnSanta_Smacked"
      Me.btnSanta_Smacked.Size = _
         New System.Drawing.Size(100, 100)
      Me.btnSanta_Smacked.TabIndex = 4
      Me.btnSanta_Smacked.Visible = False
      '
      'tbSpeed
      '
      Me.tbSpeed.BackColor = System.Drawing.Color.FromArgb _
        (CType(0, Byte), CType(192, Byte), CType(0, Byte))
      Me.tbSpeed.LargeChange = 1
      Me.tbSpeed.Location = New System.Drawing.Point(160, 160)
      Me.tbSpeed.Maximum = 5
      Me.tbSpeed.Minimum = 1
      Me.tbSpeed.Name = "tbSpeed"
      Me.tbSpeed.TabIndex = 0
      Me.tbSpeed.Value = 3
      '
      'frmSetup
      '
      Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13)
      Me.BackColor = System.Drawing.Color.FromArgb _
         (CType(0, Byte), CType(192, Byte), CType(0, Byte))
      Me.ClientSize = New System.Drawing.Size(432, 261)
      Me.Controls.AddRange(New System.Windows.Forms.Control() _
         {Me.btnSanta_Smacked, Me.btnSanta, Me.btnSmackHim, _
         Me.Label5, Me.lblSpeed, Me.lblRows, Me.lblColumns, _
         Me.Label3, Me.Label2, Me.Label1, Me.tbSpeed, _
         Me.tbColumns, Me.tbRows})
      Me.Name = "frmSetup"
      Me.Text = "Control Screen"
      CType(Me.tbColumns, _
         System.ComponentModel.ISupportInitialize).EndInit() _
      CType(Me.tbRows, _
         System.ComponentModel.ISupportInitialize).EndInit()
      CType(Me.tbSpeed, _
         System.ComponentModel.ISupportInitialize).EndInit()
      Me.ResumeLayout(False)
   
    End Sub
   
   #End Region