PDA

Click to See Complete Forum and Search --> : Wierd Al Yankow sorry colorconstants


onerrorgoto
Dec 1st, 1999, 03:11 PM
Earlier today I needed som fancy colors for my app and I searched the Help and found this nice list:
From help/color constants
System Colors
Constant Value Description
vbScrollBars &H80000000 Scroll bar color
vbDesktop &H80000001 Desktop color
vbActiveTitleBar &H80000002 Color of the title bar for the active window
vbInactiveTitleBar &H80000003 Color of the title bar for the inactive window
********
from help/system color constants
System Color Constants
The following constants can be used anywhere in your code in place of the actual values:
Constant Value Description
vbScrollBars 0x80000000 Scroll bar color
vbDesktop 0x80000001 Desktop color
vbActiveTitleBar 0x80000002 Color of the title bar for the active window
vbInactiveTitleBar 0x80000003 Color of the title bar for the inactive window

Can somebody please explain the difference between the numerical values i.e.
0x80000.... and &H80000.....
Why and what and where and Who :0) decieded on using different standards(?) for the hex(I asume) values?

------------------
On Error Goto Bed :0)
anders@zsystemdesign.se

John
Dec 1st, 1999, 05:09 PM
They both refer to the same hex numbers only one is in C++ format and the other is in VB format. Use the &H version for pasting into VB, and use the 0x for use in C.


------------------
John Percival
Editor, VB-World.net
john@vb-world.net

onerrorgoto
Dec 1st, 1999, 07:11 PM
Thank you :0)

------------------
On Error Goto Bed :0)
anders@zsystemdesign.se

Lyla
Dec 2nd, 1999, 12:05 PM
Thanx all of you.
This example would give a specific color:

vbActiveTitleBar &H80000002 Color of the title bar for the active window.

Is there are a method/list for all these values so we don't have to keep guessing to find the color we want?

Thanx

onerrorgoto
Dec 2nd, 1999, 03:18 PM
Hello
Since these constants use the settings from Windows check out the properties for the monitor(rightclick on the desktop choose properties).

Maybe you can make a small app that display your settings using textbox.backcolor, use a dropdowncombo to select witch color you want to know.

------------------
On Error Goto Bed :0)
anders@zsystemdesign.se

Serge
Dec 2nd, 1999, 07:20 PM
Sure! You can open MSDN library and type Color Constants in the index. It will show you the list.

------------------

Serge

Software Developer
Serge_Dymkov@vertexinc.com
Access8484@aol.com
ICQ#: 51055819 (http://www.icq.com/51055819)