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

System Colours

Status
Not open for further replies.

scasystems

Programmer
Jan 15, 2003
44
0
0
GB
I am using system colours for all forms.
What i need to do now is change the backdrop of a chart to the same colour as the backdrop to the form.
The chart can only be set using RGB colours, so how do i find the RGB colour of the form, when the colour returned (me.backcolor) is a system colour contant!!!!!!!

cheers
 
Option Explicit

Private Declare Function OleTranslateColor Lib "olepro32" (ByVal OLE_COLOR As Long, ByVal hPal As Long, COLORREF As Long) As Long

Private Function vbGetColorRef(OLE_COLOR As Long, Optional ByVal hPal As Long = 0) As Long
Dim result As Long
Dim COLORREF As Long
result = OleTranslateColor(OLE_COLOR, hPal, COLORREF)
' We should really check result for error conditions
vbGetColorRef = COLORREF
End Function
 
Thanx for the speedy reply.Will check it out. Cheers
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top