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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Adding ActiveX Colour Palette

Status
Not open for further replies.

Deltaflyer

Programmer
Oct 11, 2000
184
GB
I have been tasked to compile an ActiveX graph, (my first ActiveX project ever) and would like to be able to choose the colors shown on the graph.

It took me a couple of days to figure out how to pass all the graph variables but that is now done, thankfully!

I have also successfully added color properties, and i have it functioning on an RGB(r,g,b) entry at the moment. What i would like is to be able to select the colours, as is done on a normal control. (Y'know that small pallete window shown in the toolbox)

Does anybody know how to do this, or have any idea where i could find an example?

Thanks for any assistance, this is pretty much the final hurdle and it would be greatly appreciated. DeltaFlyer
The Only Programmer To Crash With Style. LOL
 
FYI: here is the answer, for future reference...

Public Property Let BackColor(tColor As OLE_COLOR)
UserControl.BackColor = tColor
End Property

Public Property Get BackColor() As OLE_COLOR
BackColor = UserControl.BackColor
End Property
 
Do you want a CommonDialog control called with ShowColor?

Private Sub Command1_Click()
CommonDialog1.ShowColor
MsgBox CommonDialog1.Color
End Sub Let me know if this helps
________________________________________________________________
If you want to get the best response to a question, please check out FAQ222-2244 first

'There are 10 kinds of people in the world: those who understand binary, and those who don't.'
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top