Returns the system color of a specific element.
c% = SysCol(e%)
e%:integer expression
The SysCol() function returns the RGB value for the element specified in e%.
COLOR_ACTIVEBORDER(10) - active window
COLOR_ACTIVECAPTION(2) - active window caption
COLOR_APPWORKSPACE(12) - background of "multiple
COLOR_BACKGROUND(1) - desktop
COLOR_BTNFACE(15) - button surface
COLOR_BTNSHADOW(16) - button shadow
COLOR_BTNTEXT(18) - button text
COLOR_CAPTIONTEXT(9) - caption text
COLOR_GRAYTEXT(17) - gray (inactive) text field
COLOR_HIGHLIGHT(13) - selected items
COLOR_HIGHLIGHTTEXT(14) - text in selected items
COLOR_INACTIVATEBORDER(11) - inactive window frame
COLOR_INACTIVATECAPTION(3) - inactive caption
COLOR_MENU(4) - menu background color
COLOR_MENUTEXT(7) - menu text
COLOR_SCROLLBAR(0) - gray area in scroll bars
COLOR_WINDOW(5) - window background
COLOR_WINDOWFRAME(6) - window frames
COLOR_WINDOWTEXT(8) - color of text in windows
OpenW 1
// to open a windows with the same
// background color as the surface color
// of the push button (Command)
Win_1.BackColor = SysCol(COLOR_BTNFACE)
Win_1.BackColor = GetSysColor(COLOR_BTNFACE)
' alternative, more conform MS Windows:
Win_1.BackColor = colBtnFace
Win_1.BackColor = &H8000000F
Win_1.BackColor = _minInt + COLOR_BTNFACE
The following code shows the system colours as they are manifested on your system,
OpenW Full 1
Global Int colour = $80000000, n, y
Local a$
For n = 0 To 24
Color colour + n
PBox 10, y, 20, y + 10
Color 0
Read a$ : Text 25, y, a$ & ": " & Hex(Point(11, y + 1), 6) & " "
Add y, 20
Next n
Data "Scrollbars","Desktop","ActiveTitleBar","InactiveTitleBar","MenuBar"
Data "WindowBackground","WindowFrame","MenuText","WindowText","TitleBarText"
Data "ActiveBorder","InactiveBorder","ApplicationWorkSpace","Highlight","HighlightText"
Data "ButtonFace","ButtonShadow","GrayText","ButtonText","InactiveCaptionText"
Data "3DHighlight","3DDKShadow","3DLight","InfoText","InfoBackground"
SysCol is short for the Windows API function GetSysColor().
Color, RGBColor, BkColor, ForeColor, BackColor
{Created by Sjouke Hamstra; Last updated: 23/10/2014 by James Gaite}