How to set/retrieve Windows System Colors Using API and VBA 
Author Message
 How to set/retrieve Windows System Colors Using API and VBA

Working with Access 8.0, SR-2, on Win98 & WinNT 4.0.
I'd like to know which are and how to use the API functions to set and
retreive Windows System Colors.

Thanks a lot in advanced
Mario Osorio



Tue, 04 Dec 2001 03:00:00 GMT  
 How to set/retrieve Windows System Colors Using API and VBA
I haven't tried this but these are the calls directly from VB programming
with the windows API by Pappas & Murray

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

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

Hope this helps

Tony Oakley



Quote:
> Working with Access 8.0, SR-2, on Win98 & WinNT 4.0.
> I'd like to know which are and how to use the API functions to set and
> retreive Windows System Colors.

> Thanks a lot in advanced
> Mario Osorio




Tue, 04 Dec 2001 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Windows API call to set windows colors (HELP Please)

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

3. Setting Number of System Colors via API

4. Using API to retrieve current system font?

5. What api is used to set the system date/time

6. Formatting a floppy as a system disk using the windows API

7. VBA 6.5, Windows 2000 and Windows API

8. API for retrieving resolution and color depth?

9. setting all foreground and bkground colors to use window's current color setting

10. Retrieve system info API's

11. Setting a control's backcolor to a system color in code

12. Setting System colors from VB application

 

 
Powered by phpBB® Forum Software