Results 1 to 5 of 5

Thread: Default button backcolour

  1. #1

    Thread Starter
    Frenzied Member ae_jester's Avatar
    Join Date
    Jun 2001
    Location
    Kitchener Ontario Canada Earth
    Posts
    1,545

    Default button backcolour

    Hi,

    I have a control array of buttons which are have the default button colour as a backcolor.

    When the user scrolls over the buttons I'm changing the backcolours to something else, and what to change it back to the default colour afterwards.

    Is there a vb constant for the default button colour?

  2. #2
    The Devil crptcblade's Avatar
    Join Date
    Aug 2000
    Location
    Quetzalshacatenango
    Posts
    9,091
    VB Code:
    1. Private Declare Function GetSysColor Lib "user32" (ByVal nIndex As Long) As Long
    2.  
    3. Private Const COLOR_BTNFACE = 15
    4.  
    5. Private Sub Command1_Click()
    6.     Command1.BackColor = GetSysColor(COLOR_BTNFACE)
    7. End Sub
    Laugh, and the world laughs with you. Cry, and you just water down your vodka.


    Take credit, not responsibility

  3. #3

    Thread Starter
    Frenzied Member ae_jester's Avatar
    Join Date
    Jun 2001
    Location
    Kitchener Ontario Canada Earth
    Posts
    1,545
    I just found this. Will it work the same or is it the wrong constant. It seems to work though.

    VB Code:
    1. cmdButton(Index).BackColor = vbButtonFace

  4. #4
    The Devil crptcblade's Avatar
    Join Date
    Aug 2000
    Location
    Quetzalshacatenango
    Posts
    9,091
    Hmmm...never knew that. It should work just the same.

    Laugh, and the world laughs with you. Cry, and you just water down your vodka.


    Take credit, not responsibility

  5. #5

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