Results 1 to 2 of 2

Thread: Why doesn't my caption get updated in the Window's taskbar?

  1. #1

    Thread Starter
    Member
    Join Date
    Jan 2001
    Location
    Chicago
    Posts
    40

    Question Why doesn't my caption get updated in the Window's taskbar?

    Here's the problem:

    My program has a form with a progress bar. When the form is maximized it has the following caption "ATTA for CE - Processing" and the user can see the app's progress. However, when I minimized the form I change the caption to "%## ATTA for CE" so that the user can see the percent of the app's progress in the Window's taskbar.

    This logic works fine on NT, but XP only updates the caption in the taskbar when you click on it. If you put the mouse over it in the taskbar, it shows the current caption in a tooltip with the current percent. Does something different need to be done with XP?

    Does anyone know how to resolve this?

    My code is:

    Private Sub Form_Resize()

    DoEvents
    CurrentCaption

    End Sub

    'Changes caption based on if window is maximized or not
    Private Sub CurrentCaption()

    DoEvents
    'Checks if minimized
    If Me.WindowState = 1 Then
    Me.Caption = Str(Format((ProcessedSize / TotalProcessSize) * 100, 0)) & "% ATTA for CE"
    'Maximized
    Else
    Me.Caption = "ATTA for CE - Processing"
    End If

    End Sub

  2. #2
    Supreme User Madboy's Avatar
    Join Date
    Oct 2003
    Location
    England
    Posts
    3,253
    Ummm strange should work fine.

    Does it error at all on a XP OS? IF so you could maybe try:

    VB Code:
    1. Private Sub Form_Resize()
    2. On Error Goto XPError
    3. DoEvents
    4. CurrentCaption
    5.  
    6. End Sub
    7.  
    8. 'Changes caption based on if window is maximized or not
    9. Private Sub CurrentCaption()
    10.  
    11. DoEvents
    12. 'Checks if minimized
    13. If Me.WindowState = 1 Then
    14. Me.Caption = Str(Format((ProcessedSize / TotalProcessSize) * 100, 0)) & "% ATTA for CE"
    15. 'Maximized
    16. Else
    17. Me.Caption = "ATTA for CE - Processing"
    18. End If
    19. Exit Sub
    20. XPError:
    21. Me.Caption = Str(Format((ProcessedSize / TotalProcessSize) * 100, 0)) & "% ATTA for CE"
    22. End Sub

    Probably wrong but thats my best guess

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