Results 1 to 5 of 5

Thread: ?: Getting color codes

  1. #1
    Staifour
    Guest

    Question ?: Getting color codes

    well
    i'm trying to know the palete code of a color depending on its system code in run time
    the thing that i really wan to do is to make a part of my program the same color of the desktop and the other part a little lighter

    so what i have done is that i programed a function that finds out the red, green and blue parameters of a colour and then adds a certain amoust to each of them ( to make the color lighter ) and i tested it on palete colors and it worked well, but when i used it on system colors ( you know when selecting a color for an object in VB it can be either palete color or system color ) it didn't work so if there is way to convert system code of a color to palete code in run time everything will work

    or if there is a way to directly return a code of a color that is slightly lighter than a given color it wil be better

    i'll be thankthfull for any reply

  2. #2
    Fanatic Member PsychoMark's Avatar
    Join Date
    Feb 2001
    Location
    Netherlands
    Posts
    540
    Here I am again


    Use the GetSysColor API


    VB Code:
    1. Dim hColor As Long
    2.  
    3. hColor = GetSysColor(COLOR_DESKTOP)


    Should work
    Teaudirenopossum.Musasapientumfixaestinaure.
    (I can't hear you. There's a banana in my ear)

  3. #3
    Staifour
    Guest
    thanks a lot
    i have to get vb on this system to test all this code
    i wanted to ask you
    can you give me you email ?
    well mine is [email protected]

  4. #4
    Fanatic Member PsychoMark's Avatar
    Join Date
    Feb 2001
    Location
    Netherlands
    Posts
    540
    Look below, about 3 lines from here
    Teaudirenopossum.Musasapientumfixaestinaure.
    (I can't hear you. There's a banana in my ear)

  5. #5
    Staifour
    Guest

    Wink

    really sorry
    i've read it the first time but i forgot it was written when i send my last post

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