Skip to main content

Write a program to design the following form, allow the user to select radio buttons from Gender and AgePanel. After Selection appropriate CheckBox from Right Panel should be selected automatically. Display appropriate message into the MessageBox by clicking on Ok button.

· One min read
Kaustubh Kulkarni

PublicClass Form1
PrivateSub Button1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click
If RadioButton1.Checked = TrueAnd RadioButton3.Checked = TrueOr
RadioButton2.Checked = TrueAnd RadioButton3.Checked = TrueThen
CheckBox2.Checked = True
MsgBox(TextBox1.Text &" Sorry You Dont Drive Car")
ElseIf RadioButton1.Checked = TrueAnd RadioButton4.Checked = TrueOr
RadioButton2.Checked = TrueAnd RadioButton4.Checked = TrueThen
CheckBox1.Checked = True
MsgBox(TextBox1.Text &" You can Drive Car")
CheckBox3.Checked = True
MsgBox(TextBox1.Text &" It's All Right")