Fast Change of Forecolor/Backcolor of a Textbox with Colorpicker control (without using Commondialo
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
Rate Fast Change of Forecolor/Backcolor of a Textbox with Colorpicker control (without using Commondialo
(1(1 Vote))
'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
Fast Change of Forecolor/Backcolor of a Textbox with Colorpicker control (without using Commondialo Comments
No comments yet — be the first to post one!
Post a Comment