CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Jan 2002
    Posts
    3

    Changing button image in toolbar causes text to change

    I've been assigned a VB6 issue that I can't recreate locally. A handful of clients are reporting that the text on their Toolbar buttons changes randomly. Below is a video one of the clients sent, illustrating the issue:



    If you notice the exclamation mark icon, it's changing color as the button text changes. There's a timer in the app which changes the button's image. I suspect this is somehow linked to the issue, but an stymied as to why.

    Here's the code behind the timer:

    Code:
    Select Case tblMain.Buttons("UserLog").Image
      Case "UserLogOn"
        tblMain.Buttons("UserLog").Image = "UserLogOff"
      Case "UserLogOff"
        tblMain.Buttons("UserLog").Image = "UserLogOn"
    End Select
    tmrUserLog.Interval = 1000
    The timer is named tmrUserLog. It gets enabled when theirs a message for the user.

    Like I said, I'm stumped. Why would the text be changing on the buttons, and why for just a few users?
    Thanks for any feedback!

    Steve.

  2. #2
    Join Date
    Jul 2008
    Location
    WV
    Posts
    5,362

    Re: Changing button image in toolbar causes text to change

    Apparently I do not have the plugin installed to view the embedded video

    The first things that come to mind though would be
    Color depth settings of the PC in question
    Theme
    Video Card/Drivers
    Always use [code][/code] tags when posting code.

  3. #3
    Join Date
    Jan 2006
    Location
    Fox Lake, IL
    Posts
    15,007

    Re: Changing button image in toolbar causes text to change

    If you aren't changing the value of the FUNCTION, then the video driver is probably confused. Change CASE to whatever each time...
    David

    CodeGuru Article: Bound Controls are Evil-VB6
    2013 Samples: MS CODE Samples

    CodeGuru Reviewer
    2006 Dell CSP
    2006, 2007 & 2008 MVP Visual Basic
    If your question has been answered satisfactorily, and it has been helpful, then, please, Rate this Post!

Tags for this Thread

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

Featured