3.0 - Black Red Green Yellow Blue Magenta Cyan White 6.0 - vbBlack vbRed vbGreen vbYellow vbBlue vbMagenta vbCyan vbWhite VB 3.0 VB 6.0 Value Comment SCROLL_BARS vbScrollBars &H80000000 Scroll-bars gray area DESKTOP vbDesktop &H80000001 Desktop ACTIVE_TITLE_BAR vbActiveTitleBar &H80000002 Active window caption INACTIVE_TITLE_BAR vbInactiveTitleBar &H80000003 Inactive window caption MENU_BAR vbMenuBar &H80000004 Menu background WINDOW_BACKGROUND vbWindowBackground &H80000005 Window background WINDOW_FRAME vbWindowFrame &H80000006 Window frame MENU_TEXT vbMenuText &H80000007 Text in menus WINDOW_TEXT vbWindowText &H80000008 Text in windows TITLE_BAR_TEXT vbTitleBarText &H80000009 Text in caption, size box, scroll-bar arrow box ACTIVE_BORDER vbActiveBorder &H8000000A Active window border INACTIVE_BORDER vbInactiveBorder &H8000000B Inactive window border APPLICATION_WORKSPACE vbApplicationWorkspace &H8000000C Background color of multiple document interface (MDI) applications HIGHLIGHT vbHighlight &H8000000D Items selected item in a control HIGHLIGHT_TEXT vbHighlightText &H8000000E Text of item selected in a control BUTTON_FACE vbButtonFace &H8000000F Face shading on command buttons BUTTON_SHADOW vbButtonShadow &H80000010 Edge shading on command buttons GRAY_TEXT vbGrayText &H80000011 Grayed (disabled) text ' Set to 0 if the current display driver ' does not support a solid gray color BUTTON_TEXT vbButtonText &H80000012 Text on push buttons vbInactiveCaptionText &H80000013 Color of text in an inactive caption vb3DHighlight &H80000014 Highlight color for 3D display elements vb3DDKShadow &H80000015 Darkest shadow color for 3D display elements vb3DLight &H80000016 Second lightest of the 3D colors after vb3Dhighlight vb3DFace &H8000000F Color of text face vb3Dshadow &H80000010 Color of text shadow vbInfoText &H80000017 Color of text in ToolTips vbInfoBackground &H80000018 Background color of ToolTips
MS Access 97 code is written in Visual Basic for Applications. Though the help files do not give any predefined color constants, the VB 6.0 constants work.
UIPicture1.ForeColor = vbBlue UIPicture1.ForeColor = &hffffff ' White UIPicture1.ForeColor = &h000000 ' Black UIPicture1.ForeColor = &hxxyyzz ' xx=blue yy=green zz=red in hexNotice that VisualBasic and html place the colors in different orders.
clBlack clMaroon clGreen clOlive clNavy clPurple clTeal clGray clSilver clRed clLime clYellow clBlue clFuchsia clAqua clWhite
clScrollBar
clBackground clActiveCaption clInactiveCaption clMenu clWindow clWindowFrame clMenuText clWindowText |
clCaptionText
clActiveBorder clInactiveBorder clAppWorkSpace clHighlight clHighlightText clBtnFace clBtnShadow clGrayText |
clBtnText
clInactiveCaptionText clBtnHighlight cl3DDkShadow cl3DLight clInfoText clInfoBk clNone |
Screen Element | Value | Hex |
---|---|---|
Scroll bar | -2147483648 | &H80000000 |
Desktop | -2147483647 | &H80000001 |
Active window title bar | -2147483646 | &H80000002 |
Inactive window title bar | -2147483645 | &H80000003 |
Menu bar | -2147483644 | &H80000004 |
Window | -2147483643 | &H80000005 |
Window frame | -2147483642 | &H80000006 |
Menu text | -2147483641 | &H80000007 |
Window text | -2147483640 | &H80000008 |
Title bar text | -2147483639 | &H80000009 |
Active window border | -2147483638 | &H8000000A |
Inactive window border | -2147483637 | &H8000000B |
Application background | -2147483636 | &H8000000C |
Highlight | -2147483635 | &H8000000D |
Highlight text | -2147483634 | &H8000000E |
3-D face | -2147483633 | &H8000000F |
3-D shadow | -2147483632 | &H80000010 |
Dimmed (disabled) text | -2147483631 | &H80000011 |
Button text | -2147483630 | &H80000012 |
Inactive window title bar text | -2147483629 | &H80000013 |
3-D highlight | -2147483628 | &H80000014 |
3-D dark shadow | -2147483627 | &H80000015 |
3-D light | -2147483626 | &H80000016 |
ToolTip text | -2147483625 | &H80000017 |
ToolTip background | -2147483624 | &H80000018 |
bgcolor="#c0c0c0" Normal background gray bgcolor="#ffffff" White bgcolor="#000000" Black bgcolor="#xxyyzz" xx=red yy=green zz=blue in hex bgcolor="black" Black Black Maroon Green Olive Navy Purple Teal Gray Silver Red Lime Yellow Blue Fuchsia Aqua WhiteNotice that VisualBasic and html place the colors in different orders.
white lightGray gray darkGray black red pink orange yellow green magenta cyan bluelabelid.setBackground(Color.yellow);