|
-
Oct 13th, 2003, 09:15 AM
#1
Thread Starter
Member
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
-
Oct 13th, 2003, 09:19 AM
#2
Supreme User
Ummm strange should work fine.
Does it error at all on a XP OS? IF so you could maybe try:
VB Code:
Private Sub Form_Resize()
On Error Goto XPError
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
Exit Sub
XPError:
Me.Caption = Str(Format((ProcessedSize / TotalProcessSize) * 100, 0)) & "% ATTA for CE"
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|