VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



Change BackColor with Option buttons

by NerdAlert (1 Submission)
Category: Miscellaneous
Compatability: Visual Basic 5.0
Difficulty: Unknown Difficulty
Originally Published: Wed 12th March 2003
Date Added: Mon 8th February 2021
Rating: (1 Votes)

Change BackColor with Option buttons

Rate Change BackColor with Option buttons



Form1.BackColor = vbBlue
End Sub

Private Sub OptCyan_Click(Index As Integer)
Form1.BackColor = vbCyan
End Sub

Private Sub Optgreen_Click(Index As Integer)
Form1.BackColor = vbGreen
End Sub

Private Sub optblack_Click(Index As Integer)
Form1.BackColor = vbBlack
End Sub

Private Sub Option1_Click()
Form1.BackColor = vbRed
End Sub

Private Sub Option2_Click()
Form1.BackColor = vbGreen
End Sub

Private Sub OptMagenta_Click(Index As Integer)
Form1.BackColor = vbMagenta
End Sub

Private Sub Optwhite_Click(Index As Integer)
Form1.BackColor = vbWhite
End Sub

Private Sub optYellow_Click()
Form1.BackColor = vbYellow
End Sub

Private Sub Optred_Click(Index As Integer)
Form1.BackColor = vbRed
End Sub


"Visual Basic 5.0 has very few colors and these are the only ones. If your form is named form1 this will work just by copy, paste. But if it isn't change it back to form1. (Note:if you haven't changed its name then leave it.)"

Download this snippet    Add to My Saved Code

Change BackColor with Option buttons Comments

No comments have been posted about Change BackColor with Option buttons. Why not be the first to post a comment about Change BackColor with Option buttons.

Post your comment

Subject:
Message:
0/1000 characters