You can use the GetSysColor and SetSysColors API routines in user32.dll. They should be able to what you need.
Drider
GetSysColor
VB Declaration
Code:
Declare Function GetSysColor& Lib "user32" (ByVal nIndex As Long)
Description
Determines the color of the specified Windows display object.
Parameter Type/Description
nIndex
Long—Constant specifying a Windows display object as shown in the table that follows.
Constant Definition Windows Object
COLOR_ACTIVEBORDER Border of active window
COLOR_ACTIVECAPTION Caption of active window
COLOR_APPWORKSPACE Background of MDI desktop
COLOR_BACKGROUND Windows desktop
COLOR_BTNFACE Button
COLOR_BTNHIGHLIGHT 3D highlight of button
COLOR_BTNSHADOW 3D shading of button
COLOR_BTNTEXT Button text
COLOR_CAPTIONTEXT Text in window caption
COLOR_GRAYTEXT Gray text, or zero if dithering is used
COLOR_HIGHLIGHT Selected item background
COLOR_HIGHLIGHTTEXT Selected item text
COLOR_INACTIVEBORDER Border of inactive window
COLOR_INACTIVECAPTION Caption of inactive window
COLOR_INACTIVECAPTIONTEXT Text of inactive window
COLOR_MENU Menu
COLOR_MENUTEXT Menu text
COLOR_SCROLLBAR Scroll Bar
COLOR_WINDOW Window background
COLOR_WINDOWFRAME Window frame
COLOR_WINDOWTEXT Window text
COLOR_3DDKSHADOW 3D dark shadow*
COLOR_3DFACE Face color for 3D shaded objects*
COLOR_3DHILIGHT 3D Highlight color (Win95)
COLOR_3DLIGHT Light color for 3D shaded objects*
COLOR_INFOBK Tooltip background color*
COLOR_INFOTEXT Tooltip text color*
Constants with an asterisk are not be supported under NT 3.51
Return Value
Long — RGB color of the specified object.
Refer to file api32.txt for the current values for the COLOR_ constant values.
SetSysColors
VB Declaration
Code:
Declare Function SetSysColors& Lib "user32" (ByVal nChanges As Long, lpSysColor _
As Long, lpColorValues As Long)
Description
Sets the color of the specified Windows display object.
Parameter Type/Description
nChanges Long—Number of objects to change.
lpSysColor Long—Passed by reference. This is the first element in an integer array with nChanges elements. Each entry contains a constant specifying a Windows display object. Refer to the GetSysColors function for a complete list of objects whose colors may be set.
lpColorValues Long—Passed by reference. This is the first element in a long array of RGB values that will be used to set the colors of the objects in the lpSysColor array.