0% found this document useful (0 votes)
25 views2 pages

VB Prog4 Optionbuttoncontrol

Visual basic program 4 uploded help in exam point of you by yash sir

Uploaded by

yashlanjewar370
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
25 views2 pages

VB Prog4 Optionbuttoncontrol

Visual basic program 4 uploded help in exam point of you by yash sir

Uploaded by

yashlanjewar370
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 2

4.

Program to change the forecolor of text in editor window according


to color selected from option button
Design View:

Source Code:
Private Sub optblack_Click()
txteditor.ForeColor = vbBlack
End Sub

Private Sub optblue_Click()


txteditor.ForeColor = vbBlue
End Sub

Private Sub optgreen_Click()


txteditor.ForeColor = vbGreen
End Sub

Private Sub optred_Click()


txteditor.ForeColor = vbRed
End Sub

Private Sub optwhite_Click()


txteditor.ForeColor = vbWhite
End Sub

Private Sub Cmdend_Click()


Unload Me
End Sub
Output:

Viva Questions
1. What is role of option button?
Ans: It is used to select single option from multiple options.

2. What is the use of forecolor?


Ans: It is used to change the text color.

You might also like