Hello all, How can I call up a color pallet in VB and is it easy to use?
Printable View
Hello all, How can I call up a color pallet in VB and is it easy to use?
Like the attached file maybe? Remember to reference the common dialog control.
The link above no longer works. How do you add the color pallet to VB6?
Welcome to the forums. :wave:
Use the .ShowColor method of the CommonDialog controlYou will need, of course, to add a common dialog control to the form you want to run this on.VB Code:
Private Sub cmdShowColor_Click CommonDialog1.ShowColor End Sub
Have you noticed that this thread is 4 years old? :lol: Try this to actually retrieve the color:
VB Code:
On Error GoTo ErrorHandeler Dim someColor As Long With CommonDialog1 .CancelError = True .ShowColor someColor = .Color Me.BackColor = someColor End With Exit Sub ErrorHandeler: