This code defines event handlers for 5 radio buttons that update the text of two labels when each radio button is checked. Radio buttons 1 and 3 set the first label to "Surrey" and the second label to "BC", radio buttons 2 and 4 set the first label to "Vancouver" and the second label to "BC", and radio button 5 sets the first label to "Cambridge" and the second label to "US".
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 ratings0% found this document useful (0 votes)
76 views
Exercise 4
This code defines event handlers for 5 radio buttons that update the text of two labels when each radio button is checked. Radio buttons 1 and 3 set the first label to "Surrey" and the second label to "BC", radio buttons 2 and 4 set the first label to "Vancouver" and the second label to "BC", and radio button 5 sets the first label to "Cambridge" and the second label to "US".
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 RadioButton1_CheckedChanged(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles RadioButton1.CheckedChanged Label1.Text = "Surrey" Label2.Text = "BC" End Sub Private Sub RadioButton2_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RadioButton2.CheckedChanged Label1.Text = "Vancouver" Label2.Text = "BC" End Sub Private Sub RadioButton3_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RadioButton3.CheckedChanged Label1.Text = "Surrey" Label2.Text = "BC" End Sub Private Sub RadioButton4_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RadioButton4.CheckedChanged Label1.Text = "Vancouver" Label2.Text = "BC" End Sub Private Sub RadioButton5_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RadioButton5.CheckedChanged Label1.Text = "Cambridge" Label2.Text = "US" End Sub End Class