Example : How to set the Default selection of a Radio button on Page load.
Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
        RadioButton1.Checked = True
End Sub
Example : How to remove the Default selection of a Radio button on Page load.
Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
        RadioButton1.Checked = False
End Sub
Example : How to make more than one group of Radio buttons onto a form with different selections.
Put all the Radio buttons on different Panels(Borderless)/Group Box(Bordered)as per need.
Example : How to Set Value/Name for a Radio button dynamically on Page load.
Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
        RadioButton1.Text = "Male"        
End Sub
Example : How to Set the Right Align Radio button location dynamically on Page/Form load.
Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
        RadioButton1.CheckAlign = ContentAlignment.MiddleRight
End Sub
Example : How to Focus on a Radio button dynamically on a certain event.
Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
        RadioButton1.Focus()
End Sub
Example : How to Disable a Radio button dynamically on a certain event.
Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
    RadioButton1.Enabled = False
End Sub
Example : How to Color a Radio button text dynamically on a certain event.
Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
    RadioButton1.ForeColor = Color.Green
End Sub
Example : How to Hide a Radio button dynamically on a certain event.
Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
    RadioButton1.Visible = False
End Sub

Loading

Categories: VB .Net Codes

0 Comments

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.