AllAPI Network - The KPD-Team

 
Allapi Network
 API-Guide
 ApiViewer

 API List

 
API Resources
 Tips & Tricks
 VB Tutorials
 Error Lookup
 
Misc Stuff
 VB examples
 VB Tools
 VB Links
 Top Downloads
 
This Site
 Search Engine
 Contact Form
 

Donate to AllAPI.net

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.

 

 


Copyright © 1998-2007, The Mentalis.org Team - Privacy statement
Did you find a bug on this page? Tell us!
This site is located at http://allapi.mentalis.org/