|
-
Dec 18th, 2001, 12:45 PM
#1
?: 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
-
Dec 18th, 2001, 12:58 PM
#2
Fanatic Member
Here I am again 
Use the GetSysColor API 
VB Code:
Dim hColor As Long
hColor = GetSysColor(COLOR_DESKTOP)
Should work
Teaudirenopossum.Musasapientumfixaestinaure.
(I can't hear you. There's a banana in my ear)
-
Dec 18th, 2001, 01:02 PM
#3
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]
-
Dec 18th, 2001, 01:08 PM
#4
Fanatic Member
Look below, about 3 lines from here
Teaudirenopossum.Musasapientumfixaestinaure.
(I can't hear you. There's a banana in my ear)
-
Dec 18th, 2001, 01:12 PM
#5
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|