using system colors 
Author Message
 using system colors

Can anybody tell me how to get the windows system colors? I tried reading
them from the system.ini but found out that not all windows 95 computers
have any information under the [colors} heading there. This causes an error
in the program. How do they do it with the windows calculator?



Sun, 26 Dec 1999 03:00:00 GMT  
 using system colors

Hello,

Declare Function GetSysColor Lib "user32" (ByVal nIndex As Long) As
Long

Public Const COLOR_ACTIVEBORDER = 10
Public Const COLOR_ACTIVECAPTION = 2
Public Const COLOR_APPWORKSPACE = 12
Public Const COLOR_BACKGROUND = 1
Public Const COLOR_BTNFACE = 15
Public Const COLOR_BTNHIGHLIGHT = 20
Public Const COLOR_BTNSHADOW = 16
Public Const COLOR_BTNTEXT = 18
Public Const COLOR_CAPTIONTEXT = 9
Public Const COLOR_GRAYTEXT = 17
Public Const COLOR_HIGHLIGHT = 13
Public Const COLOR_HIGHLIGHTTEXT = 14
Public Const COLOR_INACTIVEBORDER = 11
Public Const COLOR_INACTIVECAPTION = 3
Public Const COLOR_INACTIVECAPTIONTEXT = 19
Public Const COLOR_MENU = 4
Public Const COLOR_MENUTEXT = 7
Public Const COLOR_SCROLLBAR = 0
Public Const COLOR_WINDOW = 5
Public Const COLOR_WINDOWFRAME = 6
Public Const COLOR_WINDOWTEXT = 8

         Alan Davis, Southampton, England



Sun, 26 Dec 1999 03:00:00 GMT  
 using system colors



Quote:
>Can anybody tell me how to get the windows system colors? I tried reading

System Colors

Constant        Value   Description

vbScrollBars    0x80000000      Scroll bar color.
vbDesktop       0x80000001      Desktop color.
vbActiveTitleBar        0x80000002      Color of the title bar for the
active window.
vbInactiveTitleBar      0x80000003      Color of the title bar for the
inactive window.
vbMenuBar       0x80000004      Menu background color.
vbWindowBackground      0x80000005      Window background color.
vbWindowFrame   0x80000006      Window frame color.
vbMenuText      0x80000007      Color of text on menus.
vbWindowText    0x80000008      Color of text in windows.

vbTitleBarText  0x80000009      Color of text in caption, size box,
and scroll arrow.
vbActiveBorder  0x8000000A      Border color of active window.
vbInactiveBorder        0x8000000B      Border color of inactive
window.
vbApplicationWorkspace  0x8000000C      Background color of
multiple-document interface (MDI) applications.
vbHighlight     0x8000000D      Background color of items selected in
a control.
vbHighlightText 0x8000000E      Text color of items selected in a
control.
vbButtonFace    0x8000000F      Color of shading on the face of
command buttons.
vbButtonShadow  0x80000010      Color of shading on the edge of
command buttons.

vbGrayText      0x80000011      Grayed (disabled) text.
vbButtonText    0x80000012      Text color on push buttons.

vbInactiveCaptionText   0x80000013      Color of text in an inactive
caption.
vb3DHighlight   0x80000014      Highlight color for 3D display
elements.
vb3DDKShadow    0x80000015      Darkest shadow color for 3D display
elements.
vb3DLight               0x80000016      Second lightest of the 3D
colors after vb3DHighlight.
vbInfoText              0x80000017      Color of text in ToolTips.
vbInfoBackground        0x80000018      Background color of ToolTips.



Mon, 03 Jan 2000 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Using system colors

2. How to set/retrieve Windows System Colors Using API and VBA

3. how can I retrieve the number of colors/bits per pixel used/avaliable by the system

4. Mapping Bitmap Background Colors to System Colors

5. Coversion of System Colors to true colors

6. Getting the palette color of a system color

7. Getting the palette color of a system color

8. Refreshing the system after the system colors have been changed

9. Using a Custom color from the color palette.

10. Using 256 color Palettes in High/True Color

11. Resetting original system colors on quitting application

12. Use system colors on splash screen

 

 
Powered by phpBB® Forum Software