PDA

Click to See Complete Forum and Search --> : How to get windows all colour codes


rikshawdriver
Sep 15th, 2001, 06:08 AM
Hi guys !!!

I want to get all windows colour codes (like &H80000012&,&H00FFFFFF& etc.) to store in a database.
How can i do this?
It is an urgent, help me.

chrisjk
Sep 15th, 2001, 07:42 AM
??? Surely not. There are 16 million of them

beachbum
Sep 15th, 2001, 07:53 AM
Hi
Do u really need to store them or only to be able to produce them???? VB has constants for many colours anyhow
If u only want the 'standard' colours u can store the three RGB (Red Green Blue) bytes in multiples of 64 eg 64,0,0 128,0,0 192,0,0 etc... a little less effort than 16,1/2 mill :p
Regards
Stuart

PS Maybe if u give an idea of what u are doing it may be clearer as to what the appropriate solution is.

Kaverin
Sep 15th, 2001, 04:58 PM
I noticed that first color you mentioned is a system color. If you're trying to get those, you can use GetSysColor() to retrieve the RGB associated with a given system color index. The indicies range from 0 to 28 I believe. SetSysColors() is used to change them, and it can handle either a single change, or multiple changes at once, but they're system wide of course.

Here's some stuff you may want to look at:
http://www.vbforums.com/showthread.php?s=&postid=516353#post516353
http://www.vbforums.com/showthread.php?s=&postid=512944#post512944

rikshawdriver
Sep 16th, 2001, 02:39 AM
Oh No!
:eek:
It was my colleague tej who posted that question, using my account! (Tej, please remove the cookie from your PC and start your own account:( )

Anyway thanks to you all folks. :)

Actually what I wanted was something different. I want my IIS application to change the color of a web page dynamically. (Not windows color codes) What is the convention used in creating the color codes?

Thanks in advance