Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Windows XP Default Colors

Status
Not open for further replies.

Sheriff

Programmer
Sep 1, 2001
34
US
Hi,
I'm using Win 98, I want to use The Win XP default colors in the design mode. The color property in VB6 dosen't have that color. Does any one have the Color numbers for the title bar and the form to make your app with these colors. I know you can create custom colors, however I have some degree of color blindness and can't come up with the exact match. Any help would be appreciated.

Thanks

Sheriff
 
Create a new EXE project.
Add a label.
In the properties window click the down arrow on the Background property. The window that pops up will have two tabs: Palette and System. Select System.
Scroll down the list and pick the one you want (they are named).

If you want to use the colours in code, copy the hex value from the property window after selecting it and paste it into your code.
 
Thanks Norris68,
The problem is, those colors are not in the palette colors or the system colors, at least I can't find a match of Win XP default colors and I have a degree of color blindness and unable to create an exact match.

Thanks
Sheriff
 
You could try:

Open an application that will have the colours you want.
While it is running press Alt-Print Scrn (copies active window to the clipboard)
Open up a bitmap editing package that has an eyedropper tool (that can pick a colour off an image) and paste the clipboard. Pick off the colour then read its hex value.

NB: This will then be a hard-coded colour and will not change when you change system colours.

Or, you could use the GetSysColor API - see
 
Thanks Norris68, I'll Try Both

Sheriff
 
Howdy Sheriff.
If I've read your question correctly this is what you are looking for :
Title Bar is - &H8000000D&
and the Form BG is - &H8000000F&
If I have misread your post I apologize and if I am on target then I hope this helps you out!
Regards,

ViperGTS
 
Thanks ViperGTS,
I placed in the main form Activate: frmMain.Backcolor = &H8000000F& and I didn't see any change. If it needs to be placed else where please advise. If you have a code sniplet that does this or a link that I get the code sniplet from I would greatly appreciate having it. Any help would be appreciated.
Thanks again

Sheriff
 
Hi Sheriff,
I cheat a lot with things. In this particular case try something a little out of ordinary. Copy the color number that I gave you and allow that to sit on the clipboard. Open your project and select the form. Go to the properties of the Form and find the 'backcolor' dialog. Put your mouse cursor over the color number and double click to select it. Now, with that number selected, right-click one time to get the action "paste' and just paste over the number in the dialog with the one you've copied. This works for me when I need to change colors using those numeric values.
I also used the number in the Form1.Backcolor and it worked. One key may be that I have XP -both Windows and Office Pro. But I don't know that this will make any difference really. [If anyone knows if this would make a difference, please advise because I am no longer running dual O/S on this machine]

Keep me up-to-date Sheriff! :)

ViperGTS
 
Thanks ViperGTS,
I Did that, and tried several others thing and I still come up with the same standard gray on the form.

Thanks for taking the time to help

Sheriff
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top