Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Color Picker

Status
Not open for further replies.

abdullauthan

Programmer
Apr 20, 2000
64
SA
Is there any color picker control available??? [sig][/sig]
 
the common dialog box can let you pick colors.
Click 'Project' menu 'components' and its called 'Microsoft common dialog control'
Put a chek in its box then it wil show up in the toolbars
Drag it to your form

Private Sub Command1_Click ()
' Set Cancel to True.
CommonDialog1.CancelError = True
On Error GoTo ErrHandler
' Set the Flags property.
CommonDialog1.Flags = cdlCCRGBInit
' Display the Color dialog box.
CommonDialog1.ShowColor
' Set the form's background color to the selected
' color.
Form1.BackColor = CommonDialog1.Color
Exit Sub

ErrHandler:
' User pressed Cancel button.
Exit Sub
End Sub



[sig]<p>DougP, MCP<br><a href=mailto: dposton@universal1.com> dposton@universal1.com</a><br><a href= > </a><br> Ask me how Bar-codes can help you be more productive.[/sig]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top