Option Explicit On 
Option Strict On

Public Class frmRandom
  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
  Friend WithEvents lblNumber As System.Windows.Forms.Label
  Friend WithEvents btnRandom 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()
    Me.btnRandom = New System.Windows.Forms.Button()
    Me.lblNumber = New System.Windows.Forms.Label()
    Me.SuspendLayout()
    '
    'btnRandom
    '
    Me.btnRandom.Location = New System.Drawing.Point(40, 72)
    Me.btnRandom.Name = "btnRandom"
    Me.btnRandom.Size = New System.Drawing.Size(152, 23)
    Me.btnRandom.TabIndex = 1
    Me.btnRandom.Text = "&Random Number"
    '
    'lblNumber
    '
    Me.lblNumber.BackColor = System.Drawing.Color.White
    Me.lblNumber.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D
    Me.lblNumber.Font = New System.Drawing.Font("Microsoft Sans Serif", 18!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
    Me.lblNumber.Location = New System.Drawing.Point(40, 24)
    Me.lblNumber.Name = "lblNumber"
    Me.lblNumber.Size = New System.Drawing.Size(152, 40)
    Me.lblNumber.TabIndex = 0
    Me.lblNumber.Text = "Label1"
    Me.lblNumber.TextAlign = System.Drawing.ContentAlignment.MiddleCenter
    '
    'frmRandom
    '
    Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13)
    Me.ClientSize = New System.Drawing.Size(232, 133)
    Me.Controls.AddRange(New System.Windows.Forms.Control() {Me.btnRandom, Me.lblNumber})
    Me.Name = "frmRandom"
    Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen
    Me.Text = "Random Number Problem"
    Me.ResumeLayout(False)

  End Sub

#End Region

  Dim MyRandom As New Random()


  Private Sub btnRandom_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnRandom.Click
    lblNumber.Text = Str(MyRandom.Next(100) + 1)
  End Sub
End Class
