|
-
Nov 2nd, 2000, 12:21 PM
#1
Thread Starter
Addicted Member
I have a form that has a label on it.
I need my form to properly determine the Window's apperence setting value of a user's "Desktop color" and set the label's background color to match that color.
I can code everything else, but what is the API coding for determining the user's desktop color value?
I appreciate all of your time and effort,
Daniel Christie
VB 5 and 6 Enterprise Editions,
Html, Java scipt, Vb script,
& etc...
http://www.qwcd.com
-
Nov 2nd, 2000, 12:25 PM
#2
Lively Member
place the label onto the form and then in the properties window, set the .BackColor to "Desktop"
-
Nov 2nd, 2000, 01:15 PM
#3
Thread Starter
Addicted Member
Orpheus
So your saying I can -lblShout.BackColor=Desktop- and that will set the background color to any system's desktop color?
Geez, that was very simple, I must have been sleep that day of class. (*blush*).
I appreciate all of your time and effort,
Daniel Christie
VB 5 and 6 Enterprise Editions,
Html, Java scipt, Vb script,
& etc...
http://www.qwcd.com
-
Nov 2nd, 2000, 02:08 PM
#4
Lively Member
No:
You set the property in the design view, properties window.
It would appear that this sets the color property to the current colour of the desktop on the machine upon which the form is developed - I would try it, then change the desktop colour and see if it updates the form correctly. If not, I will try to dig out the API for you.
-
Nov 2nd, 2000, 02:13 PM
#5
Thread Starter
Addicted Member
Orpheus...
Orpheus,
I gotcha, thanks again.
I appreciate all of your time and effort,
Daniel Christie
VB 5 and 6 Enterprise Editions,
Html, Java scipt, Vb script,
& etc...
http://www.qwcd.com
-
Nov 2nd, 2000, 02:28 PM
#6
Thread Starter
Addicted Member
Orpheus, it sets the color once...
It sets the color to my (the designing system), desktop color.
Once it is compiled, it stays as my system's setting and does not take note of anyone else's system settings...
I think we're gonna have to call out the big "API" guns here :-)
I appreciate all of your time and effort,
Daniel Christie
VB 5 and 6 Enterprise Editions,
Html, Java scipt, Vb script,
& etc...
http://www.qwcd.com
-
Nov 3rd, 2000, 05:47 AM
#7
Lively Member
Had more time this morning.
It would appear that if you place the line
Label1.BackColor = vbDesktop
within your form load event, the control's background colour will change to the desktop color on the machine.
Intrestingly, it also traps the SystemColorChange event and changes the background color mid flow if you change the background color using the display properties whilst the program is running.
-
Nov 3rd, 2000, 07:52 AM
#8
Thread Starter
Addicted Member
Thank you..
I am not at home at this time, but if that is true
then I am a very delighted coder, I appreciate all of your time and effort...
I hope my question didn't keep you up all last night, heh.
I appreciate all of your time and effort,
Daniel Christie
VB 5 and 6 Enterprise Editions,
Html, Java scipt, Vb script,
& etc...
http://www.qwcd.com
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
|