Radio Button in Visual Basic 6.0


A Radio Button is also known as Option button.An Option button is a round radio button that you select to turn an option on or off.This button is used where you have only one option to choose like yes or no,male or female and married or  unmarried.

1. Open Visual Basic 6.0 and create a new Standard EXE Project.

2.  From Standard EXE project Dialogbox choose Standard EXE form.

3.  Add two Radio Button  from toolbox on the form.

4. Use the properties window to change the caption of Radio Button “male”  and “female”.

 

 

 

 

 

 

 

5. Double click on Radio button  and enter the following code

 

 

 

 

 

 

 

 

 

6.Press <F5> to run.

 

 

 

 

 

 

7.When you click on male button then

Comments are closed.