Results 1 to 2 of 2

Thread: How to get the colors??

  1. #1

    Thread Starter
    Hyperactive Member toughcoder's Avatar
    Join Date
    Nov 2002
    Location
    Near, Very Near
    Posts
    340

    Unhappy How to get the colors??

    Greetings Every1,
    I'm developing a custom Command Button. It resembles the Win32 style command button. I'm giving it a property Backcolor, which can be changed to any color. The problem, is when i specify this color, i must somehow find out the Hightlight & the shadow color which window uses to give a 3D effect to the button. To the standard win32 button, these r a variation of gray colors, but suppose if i use red as my color, how must i calculate my highlight & shadow colors. This is a difficult problem i suppose, but i'll be glad if some1 will plz help me. Thanq.
    If Not VB Then Exit
    ------------------------------------------------
    visit me @ http://mzubair.50g.com/

  2. #2
    Retired VBF Adm1nistrator plenderj's Avatar
    Join Date
    Jan 2001
    Location
    Dublin, Ireland
    Posts
    10,359
    If you add an option button, and set its style to graphical, you basically get a command button.
    And if you change the backcolour of that, the shadowcolours stay the same - ie. grey.
    Microsoft MVP : Visual Developer - Visual Basic [2004-2005]

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