by Patrick Lockefeer (III) (1 Submission)
Category: Custom Controls/Forms/Menus
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Sun 24th July 2005
Date Added: Mon 8th February 2021
Rating: (1 Votes)
Fast Change of Forecolor/Backcolor of a Textbox with Colorpicker control (without using Commondialog control)
API Declarations
Controls :
Frame : Name Frame1
2 Optionbuttons : Name :Option1 Caption :Forecolor
Name :Option2 Caption :BackColor
'Add Colorpicker control >> Components >> Colorpicker v1.0
ColorPicker Name :Colorpicker1
TextBox Name :Text1
'Pick your Color
'Note that the Optionbutton will change to the other Option (vice versa)
Private Sub ColorPicker1_Click()
If Option1.Value = True Then
Text1.ForeColor = ColorPicker1
'Change to BackColor option
Option1.Value = False
Option2.Value = True
Else
Text1.BackColor = ColorPicker1
'Change to ForeColor option
Option1.Value = True
Option2.Value = False
End If
End Sub
Private Sub Option1_Click()
Option1.Value = True
End Sub
Private Sub Option2_Click()
Option2.Value = True
End Sub
No comments have been posted about Fast Change of Forecolor/Backcolor of a Textbox with Colorpicker control (without using Commondialo. Why not be the first to post a comment about Fast Change of Forecolor/Backcolor of a Textbox with Colorpicker control (without using Commondialo.