Public Class Form1
  Inherits System.Windows.Forms.Form
  Dim WhichOne As Integer

#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 Label2 As System.Windows.Forms.Label
  Friend WithEvents txtOperand1 As System.Windows.Forms.TextBox
  Friend WithEvents txtOperand2 As System.Windows.Forms.TextBox
  Friend WithEvents GroupBox1 As System.Windows.Forms.GroupBox
  Friend WithEvents Label3 As System.Windows.Forms.Label
  Friend WithEvents txtExpression As System.Windows.Forms.TextBox
  Friend WithEvents RadioButton1 As System.Windows.Forms.RadioButton
  Friend WithEvents RadioButton2 As System.Windows.Forms.RadioButton
  Friend WithEvents RadioButton3 As System.Windows.Forms.RadioButton
  Friend WithEvents RadioButton4 As System.Windows.Forms.RadioButton
  Friend WithEvents RadioButton5 As System.Windows.Forms.RadioButton
  Friend WithEvents RadioButton6 As System.Windows.Forms.RadioButton
  Friend WithEvents GroupBox2 As System.Windows.Forms.GroupBox
  Friend WithEvents ckbTrue As System.Windows.Forms.CheckBox
  Friend WithEvents btnTest As System.Windows.Forms.Button
  Friend WithEvents btnExit As System.Windows.Forms.Button
  Friend WithEvents ckbFalse As System.Windows.Forms.CheckBox
  <System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
    Me.Label1 = New System.Windows.Forms.Label()
    Me.Label2 = New System.Windows.Forms.Label()
    Me.txtOperand1 = New System.Windows.Forms.TextBox()
    Me.txtOperand2 = New System.Windows.Forms.TextBox()
    Me.GroupBox1 = New System.Windows.Forms.GroupBox()
    Me.RadioButton6 = New System.Windows.Forms.RadioButton()
    Me.RadioButton5 = New System.Windows.Forms.RadioButton()
    Me.RadioButton4 = New System.Windows.Forms.RadioButton()
    Me.RadioButton3 = New System.Windows.Forms.RadioButton()
    Me.RadioButton2 = New System.Windows.Forms.RadioButton()
    Me.RadioButton1 = New System.Windows.Forms.RadioButton()
    Me.Label3 = New System.Windows.Forms.Label()
    Me.txtExpression = New System.Windows.Forms.TextBox()
    Me.GroupBox2 = New System.Windows.Forms.GroupBox()
    Me.ckbFalse = New System.Windows.Forms.CheckBox()
    Me.ckbTrue = New System.Windows.Forms.CheckBox()
    Me.btnTest = New System.Windows.Forms.Button()
    Me.btnExit = New System.Windows.Forms.Button()
    Me.GroupBox1.SuspendLayout()
    Me.GroupBox2.SuspendLayout()
    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, 48)
    Me.Label1.Name = "Label1"
    Me.Label1.TabIndex = 0
    Me.Label1.Text = "Operand1"
    Me.Label1.TextAlign = System.Drawing.ContentAlignment.MiddleCenter
    '
    '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(224, 48)
    Me.Label2.Name = "Label2"
    Me.Label2.TabIndex = 1
    Me.Label2.Text = "Operand2"
    Me.Label2.TextAlign = System.Drawing.ContentAlignment.MiddleCenter
    '
    'txtOperand1
    '
    Me.txtOperand1.Location = New System.Drawing.Point(8, 72)
    Me.txtOperand1.Name = "txtOperand1"
    Me.txtOperand1.TabIndex = 2
    Me.txtOperand1.Text = "txtOperand1"
    '
    'txtOperand2
    '
    Me.txtOperand2.Location = New System.Drawing.Point(224, 72)
    Me.txtOperand2.Name = "txtOperand2"
    Me.txtOperand2.TabIndex = 3
    Me.txtOperand2.Text = "txtOperand2"
    '
    'GroupBox1
    '
    Me.GroupBox1.Controls.AddRange(New System.Windows.Forms.Control() {Me.RadioButton6, Me.RadioButton5, Me.RadioButton4, Me.RadioButton3, Me.RadioButton2, Me.RadioButton1})
    Me.GroupBox1.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
    Me.GroupBox1.Location = New System.Drawing.Point(128, 16)
    Me.GroupBox1.Name = "GroupBox1"
    Me.GroupBox1.Size = New System.Drawing.Size(80, 120)
    Me.GroupBox1.TabIndex = 4
    Me.GroupBox1.TabStop = False
    Me.GroupBox1.Text = "Operator:"
    '
    'RadioButton6
    '
    Me.RadioButton6.Location = New System.Drawing.Point(8, 96)
    Me.RadioButton6.Name = "RadioButton6"
    Me.RadioButton6.Size = New System.Drawing.Size(64, 16)
    Me.RadioButton6.TabIndex = 5
    Me.RadioButton6.Text = "<="
    '
    'RadioButton5
    '
    Me.RadioButton5.Location = New System.Drawing.Point(8, 80)
    Me.RadioButton5.Name = "RadioButton5"
    Me.RadioButton5.Size = New System.Drawing.Size(64, 16)
    Me.RadioButton5.TabIndex = 4
    Me.RadioButton5.Text = ">="
    '
    'RadioButton4
    '
    Me.RadioButton4.Location = New System.Drawing.Point(8, 64)
    Me.RadioButton4.Name = "RadioButton4"
    Me.RadioButton4.Size = New System.Drawing.Size(64, 16)
    Me.RadioButton4.TabIndex = 3
    Me.RadioButton4.Text = "<"
    '
    'RadioButton3
    '
    Me.RadioButton3.Location = New System.Drawing.Point(8, 48)
    Me.RadioButton3.Name = "RadioButton3"
    Me.RadioButton3.Size = New System.Drawing.Size(64, 16)
    Me.RadioButton3.TabIndex = 2
    Me.RadioButton3.Text = ">"
    '
    'RadioButton2
    '
    Me.RadioButton2.Location = New System.Drawing.Point(8, 32)
    Me.RadioButton2.Name = "RadioButton2"
    Me.RadioButton2.Size = New System.Drawing.Size(64, 16)
    Me.RadioButton2.TabIndex = 1
    Me.RadioButton2.Text = "<>"
    '
    'RadioButton1
    '
    Me.RadioButton1.Location = New System.Drawing.Point(8, 16)
    Me.RadioButton1.Name = "RadioButton1"
    Me.RadioButton1.Size = New System.Drawing.Size(64, 16)
    Me.RadioButton1.TabIndex = 0
    Me.RadioButton1.Text = "="
    '
    'Label3
    '
    Me.Label3.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D
    Me.Label3.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
    Me.Label3.Location = New System.Drawing.Point(8, 136)
    Me.Label3.Name = "Label3"
    Me.Label3.Size = New System.Drawing.Size(100, 20)
    Me.Label3.TabIndex = 5
    Me.Label3.Text = "Test Expression:"
    Me.Label3.TextAlign = System.Drawing.ContentAlignment.MiddleRight
    '
    'txtExpression
    '
    Me.txtExpression.Location = New System.Drawing.Point(104, 136)
    Me.txtExpression.Name = "txtExpression"
    Me.txtExpression.Size = New System.Drawing.Size(216, 20)
    Me.txtExpression.TabIndex = 6
    Me.txtExpression.Text = "txtExpression"
    '
    'GroupBox2
    '
    Me.GroupBox2.Controls.AddRange(New System.Windows.Forms.Control() {Me.ckbFalse, Me.ckbTrue})
    Me.GroupBox2.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
    Me.GroupBox2.Location = New System.Drawing.Point(8, 168)
    Me.GroupBox2.Name = "GroupBox2"
    Me.GroupBox2.Size = New System.Drawing.Size(312, 40)
    Me.GroupBox2.TabIndex = 7
    Me.GroupBox2.TabStop = False
    Me.GroupBox2.Text = "Result of Relational Test:"
    '
    'ckbFalse
    '
    Me.ckbFalse.Location = New System.Drawing.Point(184, 16)
    Me.ckbFalse.Name = "ckbFalse"
    Me.ckbFalse.Size = New System.Drawing.Size(104, 16)
    Me.ckbFalse.TabIndex = 1
    Me.ckbFalse.Text = "False"
    '
    'ckbTrue
    '
    Me.ckbTrue.Location = New System.Drawing.Point(24, 16)
    Me.ckbTrue.Name = "ckbTrue"
    Me.ckbTrue.Size = New System.Drawing.Size(104, 16)
    Me.ckbTrue.TabIndex = 0
    Me.ckbTrue.Text = "True"
    '
    'btnTest
    '
    Me.btnTest.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
    Me.btnTest.Location = New System.Drawing.Point(16, 224)
    Me.btnTest.Name = "btnTest"
    Me.btnTest.Size = New System.Drawing.Size(104, 24)
    Me.btnTest.TabIndex = 8
    Me.btnTest.Text = "&Test"
    '
    '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(216, 224)
    Me.btnExit.Name = "btnExit"
    Me.btnExit.Size = New System.Drawing.Size(104, 24)
    Me.btnExit.TabIndex = 9
    Me.btnExit.Text = "E&xit"
    '
    'Form1
    '
    Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13)
    Me.ClientSize = New System.Drawing.Size(336, 253)
    Me.Controls.AddRange(New System.Windows.Forms.Control() {Me.btnExit, Me.btnTest, Me.GroupBox2, Me.txtExpression, Me.Label3, Me.GroupBox1, Me.txtOperand2, Me.txtOperand1, Me.Label2, Me.Label1})
    Me.Name = "Form1"
    Me.Text = "Relational Operators"
    Me.GroupBox1.ResumeLayout(False)
    Me.GroupBox2.ResumeLayout(False)
    Me.ResumeLayout(False)

  End Sub

#End Region

  Private Sub GroupBox1_Enter(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles GroupBox1.Enter

  End Sub

  Private Sub btnTest_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnTest.Click
    ckbTrue.Checked = False     ' Set to false to begin with
    ckbFalse.Checked = False
    Dim Result As Integer

    Result = 16 Xor 4

    Select Case WhichOne
      Case 1
        txtExpression.Text = txtOperand1.Text & " = " & txtOperand2.Text
        If txtOperand1.Text = txtOperand2.Text Then
          ckbTrue.Checked = True
        Else
          ckbFalse.Checked = True
        End If
      Case 2
        txtExpression.Text = txtOperand1.Text & " <> " & txtOperand2.Text
        If txtOperand1.Text <> txtOperand2.Text Then
          ckbTrue.Checked = True
        Else
          ckbFalse.Checked = True
        End If
      Case 3
        txtExpression.Text = txtOperand1.Text & " > " & txtOperand2.Text
        If txtOperand1.Text > txtOperand2.Text Then
          ckbTrue.Checked = True
        Else
          ckbFalse.Checked = True
        End If
      Case 4
        txtExpression.Text = txtOperand1.Text & " < " & txtOperand2.Text
        If txtOperand1.Text < txtOperand2.Text Then
          ckbTrue.Checked = True
        Else
          ckbFalse.Checked = True
        End If
      Case 5
        txtExpression.Text = txtOperand1.Text & " >= " & txtOperand2.Text
        If txtOperand1.Text >= txtOperand2.Text Then
          ckbTrue.Checked = True
        Else
          ckbFalse.Checked = True
        End If
      Case 6
        txtExpression.Text = txtOperand1.Text & " <= " & txtOperand2.Text
        If txtOperand1.Text <= txtOperand2.Text Then
          ckbTrue.Checked = True
        Else
          ckbFalse.Checked = True
        End If
    End Select
  End Sub

  Private Sub RadioButton1_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RadioButton1.CheckedChanged
    WhichOne = 1
  End Sub

  Private Sub RadioButton2_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RadioButton2.CheckedChanged
    WhichOne = 2

  End Sub

  Private Sub RadioButton3_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RadioButton3.CheckedChanged
    WhichOne = 3
  End Sub

  Private Sub RadioButton4_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RadioButton4.CheckedChanged
    WhichOne = 4
  End Sub

  Private Sub RadioButton5_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RadioButton5.CheckedChanged
    WhichOne = 5
  End Sub

  Private Sub RadioButton6_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RadioButton6.CheckedChanged
    WhichOne = 6
  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 Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

  End Sub
End Class
