0% found this document useful (0 votes)
49 views1 page

Public Class Form2

The code defines actions for when a button is clicked. It checks the text in a text box and depending on whether it equals "A", "a", "B", "b", "C", "c", "D", or "d", sets the text of two labels to different numeric values.

Uploaded by

api-347017345
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
49 views1 page

Public Class Form2

The code defines actions for when a button is clicked. It checks the text in a text box and depending on whether it equals "A", "a", "B", "b", "C", "c", "D", or "d", sets the text of two labels to different numeric values.

Uploaded by

api-347017345
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 1

Public Class Form1

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)


Handles Button1.Click
If TextBox1.Text = "A" Then
Label4.Text = "9"
Label5.Text = "6"
ElseIf TextBox1.Text = "a" Then
Label4.Text = "9"
Label5.Text = "6"
End If
If TextBox1.Text = "B" Then
Label4.Text = "10"
Label5.Text = "5"
ElseIf TextBox1.Text = "b" Then
Label4.Text = "10"
Label5.Text = "5"
End If
If TextBox1.Text = "C" Then
Label4.Text = "11"
Label5.Text = "4"
ElseIf TextBox1.Text = "c" Then
Label4.Text = "11"
Label5.Text = "4"
End If
If TextBox1.Text = "D" Then
Label4.Text = "14"
Label5.Text = "1"
ElseIf TextBox1.Text = "d" Then
Label4.Text = "14"
Label5.Text = "1"

End If
End Sub
End Class

You might also like