RadioButton Control
A radio button or option button is a type of graphical user interface element that allows the user to choose only one of a predefined set of options. When a user clicks on a radio button, it becomes checked, and all other radio buttons with same group become unchecked.

The radio button and the check box are used for different functions. Use a radio button when you want the user to choose only one option. When you want the user to choose all appropriate options, use a check box. Like check boxes, radio buttons support a Checked property that indicates whether the radio button is selected.
Public Class Form1 Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load RadioButton1.Checked = True End Sub Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click If RadioButton1.Checked = True Then MsgBox("You are selected Red !! ") Exit Sub ElseIf RadioButton2.Checked = True Then MsgBox("You are selected Blue !! ") Exit Sub Else MsgBox("You are selected Green !! ") Exit Sub End If End Sub End Class
Related Topics
- Visual Studio IDE
- How to Create a vb.net Windows Forms Application
- Label Control
- Button Control
- TextBox Control
- ComboBox Control
- ListBox Control
- Checked ListBox Control
- CheckBox Control
- PictureBox Control
- ProgressBar Control
- ScrollBars Control
- DateTimePicker Control
- Treeview Control
- ListView Control
- Menu Control
- MDI Form
- Color Dialog Box
- Font Dialog Box
- OpenFile Dialog Box
- Print Dialog Box
- KeyPress event in VB.NET
- How to create Dynamic Controls in VB.NET ?
- How do i keep a form on top of others
- Timer Control - VB.Net