Results 1 to 2 of 2
  1. #1
    2 Star Lounger
    Join Date
    Nov 2001
    Posts
    119
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Toolbar Button - Can I change SetFocus color? (Word 2002)

    Hi,

    Is it possible to change the SetFocus color of a custom toolbar button?

    Attached is an image of a button with the default Word SetFocus color applied.

    If possible, I would like to change this to red. Is this doable?

    Any advice would be much appreciated [img]/forums/images/smilies/smile.gif[/img]

    Thanks, Chris
    Attached Images Attached Images

  2. #2
    2 Star Lounger
    Join Date
    Nov 2001
    Posts
    119
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Toolbar Button - Can I change SetFocus color? (Word 2002)

    Anybody have any ideas on this one?

    I have managed to put together a bit of code, using the Windows API, which effects the SetFocus color of all buttons in Windows!

    Private Declare Function SetSysColors Lib "user32" (ByVal nChanges As Long, lpSysColor As Long, lpColorValues As Long) As Long
    Private Declare Function GetSysColor Lib "user32" (ByVal nIndex As Long) As Long

    Const COLOR_BTNHIGHLIGHT = 20 '3D highlight of button

    Sub Color_Down()
    'Change the active caption's color:
    g& = SetSysColors(1, COLOR_BTNHIGHLIGHT, RGB(100, 0, 0))
    End Sub

    However, as much fun as this is to do, changing the Focus color of all buttons in the windows environment is not a good thing. Does anybody know how to get this to work for the Word toolbar only?

    Thanks, Chris

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •