Results 1 to 6 of 6

Thread: Wierd Al Yankow sorry colorconstants

  1. #1

    Thread Starter
    Hyperactive Member onerrorgoto's Avatar
    Join Date
    Aug 1999
    Location
    Sweden
    Posts
    330

    Post

    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)
    [email protected]



  2. #2
    Fanatic Member
    Join Date
    Jan 1999
    Location
    UK
    Posts
    593

    Post

    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
    [email protected]


  3. #3

    Thread Starter
    Hyperactive Member onerrorgoto's Avatar
    Join Date
    Aug 1999
    Location
    Sweden
    Posts
    330

    Post

    Thank you :0)

    ------------------
    On Error Goto Bed :0)
    [email protected]



  4. #4
    Addicted Member
    Join Date
    Jul 1999
    Location
    Portland, OR.
    Posts
    226

    Post

    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

  5. #5

    Thread Starter
    Hyperactive Member onerrorgoto's Avatar
    Join Date
    Aug 1999
    Location
    Sweden
    Posts
    330

    Post

    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)
    [email protected]



  6. #6
    Serge's Avatar
    Join Date
    Feb 1999
    Location
    Scottsdale, Arizona, USA
    Posts
    2,744

    Post

    Sure! You can open MSDN library and type Color Constants in the index. It will show you the list.

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

    Serge

    Software Developer
    [email protected]
    [email protected]
    ICQ#: 51055819


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