Results 1 to 5 of 5

Thread: How to get windows all colour codes

  1. #1

    Thread Starter
    Addicted Member rikshawdriver's Avatar
    Join Date
    Apr 2001
    Posts
    160

    How to get windows all colour codes

    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.
    Thomas

  2. #2
    PowerPoster
    Join Date
    Jul 1999
    Posts
    5,923
    ??? Surely not. There are 16 million of them

  3. #3
    PowerPoster beachbum's Avatar
    Join Date
    Jul 2001
    Location
    Wollongong, NSW, Australia
    Posts
    2,274
    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
    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.
    Stuart Laidlaw
    Brightspark Financial Software
    http://www.gstsmartbook.com

  4. #4
    Fanatic Member Kaverin's Avatar
    Join Date
    Oct 2000
    Posts
    930
    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.p...353#post516353
    http://www.vbforums.com/showthread.p...944#post512944
    I'm baaaack...
    VB5 Professional Edition, VC++ 6
    Using a 1 gHz Thunderbird, 256 mb RAM, 40 gb HD system with Win98se

    I feel special because I finally figured out how to loop midis: Post link
    I'm a fanatic too

  5. #5

    Thread Starter
    Addicted Member rikshawdriver's Avatar
    Join Date
    Apr 2001
    Posts
    160
    Oh No!

    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
    Thomas

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width