I have a progress bar that I use to indicate saving a file.
My app files are very small and save in a split second. So I decided to just show a progress bar that says “Saving…” just as an acknowledgement - it’s more of a mental thing that I personally like. It’s a small modal window that does its thing using a timer for approx. 1 second, then closes.
This all works perfectly in Win7, but testing recently in Win8.1 the progress bar doesn’t work the same. The progress bar in Win7 starts at zero and goes to the end (max) but in Win8.1 the progress bar starts at zero but finishes around 60% through.
There is no detrimental issue caused to the running app, but it just doesn’t look good. It looks as though the file starts saving, then had a problem part way through possibly leaving the user unsure. (or maybe it’s just me.)
In the open event of the progress bar window:
[code] // Set the timer update period
TimerProgressSAVE.Period = 20
// Set the current start value to 0
ProgressBarSAVE.Value = 0
// Set the maximum value: small number = faster, large number = slower
ProgressBarSAVE.Maximum = 80
// Run the timer to move the progress indicator
TimerProgressSAVE.Mode = 2[/code]
In the Timer Action Event:
[code] // Add 2 to the value
ProgressBarSAVE.Value = ProgressBarSAVE.Value + 2
// If we’ve reached the end
If ProgressBarSAVE.Value > ProgressBarSAVE.Maximum Then
// turn the timer off
Me.Mode = 0
WindowProgressSave.Close //close out
End If[/code]
There’s not really much to it.
My logic says it should work fine - hopefully there is something I’ve missed. Any alternate solutions would be good.