Public Class frmStringArray
  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 Label1 As System.Windows.Forms.Label
  Friend WithEvents txtIndex As System.Windows.Forms.TextBox
  Friend WithEvents Label2 As System.Windows.Forms.Label
  Friend WithEvents txtDay As System.Windows.Forms.TextBox
  Friend WithEvents btnShowDay As System.Windows.Forms.Button
  Friend WithEvents btnExit As System.Windows.Forms.Button
  <System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
    Me.Label1 = New System.Windows.Forms.Label()
    Me.txtIndex = New System.Windows.Forms.TextBox()
    Me.Label2 = New System.Windows.Forms.Label()
    Me.txtDay = New System.Windows.Forms.TextBox()
    Me.btnShowDay = New System.Windows.Forms.Button()
    Me.btnExit = New System.Windows.Forms.Button()
    Me.SuspendLayout()
    '
    'Label1
    '
    Me.Label1.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D
    Me.Label1.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
    Me.Label1.Location = New System.Drawing.Point(8, 8)
    Me.Label1.Name = "Label1"
    Me.Label1.Size = New System.Drawing.Size(264, 20)
    Me.Label1.TabIndex = 0
    Me.Label1.Text = "Enter number for Day of the Week (Monday = 1) "
    Me.Label1.TextAlign = System.Drawing.ContentAlignment.MiddleRight
    '
    'txtIndex
    '
    Me.txtIndex.Location = New System.Drawing.Point(272, 8)
    Me.txtIndex.Name = "txtIndex"
    Me.txtIndex.Size = New System.Drawing.Size(64, 20)
    Me.txtIndex.TabIndex = 1
    Me.txtIndex.Text = ""
    '
    'Label2
    '
    Me.Label2.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D
    Me.Label2.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
    Me.Label2.Location = New System.Drawing.Point(8, 40)
    Me.Label2.Name = "Label2"
    Me.Label2.Size = New System.Drawing.Size(264, 20)
    Me.Label2.TabIndex = 2
    Me.Label2.Text = "The day is:"
    Me.Label2.TextAlign = System.Drawing.ContentAlignment.MiddleRight
    Me.Label2.Visible = False
    '
    'txtDay
    '
    Me.txtDay.Location = New System.Drawing.Point(272, 40)
    Me.txtDay.Name = "txtDay"
    Me.txtDay.Size = New System.Drawing.Size(64, 20)
    Me.txtDay.TabIndex = 3
    Me.txtDay.Text = ""
    Me.txtDay.Visible = False
    '
    'btnShowDay
    '
    Me.btnShowDay.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
    Me.btnShowDay.Location = New System.Drawing.Point(8, 72)
    Me.btnShowDay.Name = "btnShowDay"
    Me.btnShowDay.Size = New System.Drawing.Size(88, 24)
    Me.btnShowDay.TabIndex = 4
    Me.btnShowDay.Text = "&Show Day"
    '
    'btnExit
    '
    Me.btnExit.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
    Me.btnExit.Location = New System.Drawing.Point(248, 72)
    Me.btnExit.Name = "btnExit"
    Me.btnExit.Size = New System.Drawing.Size(88, 24)
    Me.btnExit.TabIndex = 5
    Me.btnExit.Text = "E&xit"
    '
    'frmStringArray
    '
    Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13)
    Me.ClientSize = New System.Drawing.Size(344, 133)
    Me.Controls.AddRange(New System.Windows.Forms.Control() {Me.btnExit, Me.btnShowDay, Me.txtDay, Me.Label2, Me.txtIndex, Me.Label1})
    Me.Name = "frmStringArray"
    Me.Text = "Day of the Week Program"
    Me.ResumeLayout(False)

  End Sub

#End Region

  Private Sub btnShowDay_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnShowDay.Click
    Dim DaysOfTheWeek() As String

    ReDim DaysOfTheWeek(5)

    DaysOfTheWeek(0) = "Monday"
    DaysOfTheWeek(1) = "Tuesday"
    DaysOfTheWeek(2) = "Wednesday"
    DaysOfTheWeek(3) = "Thursday"
    DaysOfTheWeek(4) = "Friday"
    DaysOfTheWeek(5) = "Saturday"
    DaysOfTheWeek(6) = "Sunday"

    txtDay.Text = DaysOfTheWeek(CInt(txtIndex.Text) - 1)
    Label2.Visible = True
    txtDay.Visible = True
  End Sub

  Private Sub btnExit_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnExit.Click
    Me.Dispose()
  End Sub

  Private Sub frmStringArray_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

  End Sub
End Class
