How do I find out the colour of the title
bar?
Use the API function GetSysColor. It has only one parameter. This is one of the
constants written above that specifies which object you want to retrieve the colour of.
The declaration of this function is: Declare Function
GetSysColor Lib "user32" Alias _
"GetSysColor" (ByVal nIndex As Long) As
Long
This function will return the RGB value of the object. For example, If you want to find
out the colour of the active caption, you would use the following code: col& = GetSysColor(COLOR_ACTIVECAPTION)
NB: For these two functions to work, you must declare the constants as well as the
functions.
|