world.GetSysColor
Gets the colour of various windows items
Prototype
long GetSysColor(long Index);
Description
This function directly calls GetSysColor in Windows. It returns the colour used by various items as currently configured in Windows, based on the selector (Index), as follows:
Scrollbar = 0
Background = 1
Active caption = 2
Inactive caption = 3
Menu = 4
Window = 5
Window frame = 6
Menu text = 7
Window text = 8
Caption text = 9
Active border = 10
Inactive border = 11
Application workspace = 12
Highlight = 13
Highlight text = 14
Button face = 15
Button shadow = 16
Gray text = 17
Button text = 18
Inactive caption text = 19
Button highlight = 20
3D dark shadow = 21
3D light = 22
Info text = 23
Info bk = 24
VBscript example
Note RGBColourToName (GetSysColor (4)) ' --> may print "silver"
Jscript example
Note (RGBColourToName (GetSysColor (4)))
Lua example
Note (RGBColourToName (GetSysColor (4))) --> silver
Return value
The RGB code corresponding to the selected colour index.
If the index is out of range, zero is returned.
Related topic
See also
| Function | Description |
|---|---|
| GetSystemMetrics | Returns selected system information from Windows |
| RGBColourToName | Converts an RGB colour code to its equivalent name |