VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



'Get system colors using GetSysColor API

by Karthikeyan (187 Submissions)
Category: Windows API Call/Explanation
Compatability: Visual Basic 5.0
Difficulty: Unknown Difficulty
Originally Published: Tue 23rd January 2001
Date Added: Mon 8th February 2021
Rating: (1 Votes)

'Get system colors using GetSysColor API

API Declarations


Const COLOR_SCROLLBAR = 0
Const COLOR_BACKGROUND = 1
Const COLOR_ACTIVECAPTION = 2
Const COLOR_INACTIVECAPTION = 3
Const COLOR_MENU = 4
Const COLOR_WINDOW = 5
Const COLOR_WINDOWFRAME = 6
Const COLOR_MENUTEXT = 7
Const COLOR_WINDOWTEXT = 8
Const COLOR_CAPTIONTEXT = 9
Const COLOR_ACTIVEBORDER = 10
Const COLOR_INACTIVEBORDER = 11
Const COLOR_APPWORKSPACE = 12
Const COLOR_HIGHLIGHT = 13
Const COLOR_HIGHLIGHTTEXT = 14
Const COLOR_BTNFACE = 15
Const COLOR_BTNSHADOW = 16
Const COLOR_GRAYTEXT = 17
Const COLOR_BTNTEXT = 18
Const COLOR_INACTIVECAPTIONTEXT = 19
Const COLOR_BTNHIGHLIGHT = 20
Const COLOR_3DDKSHADOW = 21
Const COLOR_3DLIGHT = 22
Const COLOR_INFOTEXT = 23
Const COLOR_INFOBK = 24
Const COLOR_HOTLIGHT = 26
Const COLOR_GRADIENTACTIVECAPTION = 27
Const COLOR_GRADIENTINACTIVECAPTION = 28

Rate 'Get system colors using GetSysColor API



'http://www.geocities.com/marskarthik
'http://marskarthik.virtualave.net
'Email: [email protected]
Private Sub Form_Load()
MsgBox "Color of Scrollbar is " & Hex(GetSysColor(COLOR_SCROLLBAR)) & Chr(13) & _
"Color of Background is " & Hex(GetSysColor(COLOR_BACKGROUND)) & Chr(13) & _
"Color of Active Caption is " & Hex(GetSysColor(COLOR_ACTIVECAPTION)) & Chr(13) & _
"Color of InActive Caption is " & Hex(GetSysColor(COLOR_INACTIVECAPTION))
End
End Sub

Download this snippet    Add to My Saved Code

'Get system colors using GetSysColor API Comments

No comments have been posted about 'Get system colors using GetSysColor API. Why not be the first to post a comment about 'Get system colors using GetSysColor API.

Post your comment

Subject:
Message:
0/1000 characters