I was using (pseudo code):
Code: Select all
Repeat
; Check for events (to prevent mouse from showing as an hourglass)
event = WindowEvent()
; Check every 20 ms
delay(20)
; Update the progress bar
Show_Progress()
; attempt to rename target file to itself (fails if file not yet created)
Result = RenameFile(OutputFile$, OutputFile$)
Until Result = #True
; Show 100% Complete
Show_Progress(100)
Delay(300)
I changed the code to use a timer (really wanted to avoid using a timer... oh well

Code: Select all
;Setup a 20 ms timer
SetTimer_(WindowID(),1,20,0)
Repeat
; Check for events (to prevent mouse from showing as an hourglass)
event = WindowEvent()
If Event = #WM_TIMER
; Update the progress bar
Show_Progress()
; attempt to rename target file to itself (fails if file not yet created)
Result = RenameFile(OutputFile$, OutputFile$)
Endif
Until Result = #True
; Show 100% Complete
Show_Progress(100)
Delay(300)
It this a PB bug, or am I doing something wrong?