BUG: Progress Bar Does Not Paint When DragMode AutomaticLast reviewed: October 16, 1996Article ID: Q150219 |
The information in this article applies to:
SYMPTOMSIf the DragMode property of the Microsoft Windows 95 Progress Bar control is set to 1-Automatic, it does not paint if the progress of the control is updated.
STATUSMicrosoft has confirmed this to be an issue in the Microsoft products listed at the beginning of this article. Microsoft is researching this issue and will post new information here in the Microsoft Knowledge Base as it becomes available.
WORKAROUNDSet DragMode to 0-Manual before progress is updated, and then reset it to 1- Automatic after the control has had time to paint. Instead of updating the value directly, the following subroutine can be called to update the value. The first parameter is the control itself and the second parameter is the new value for the progress:
Public Sub UpdateProgress(ProgBar As Object, NewValue As Integer) 'Turn drag to Manual briefly. ProgBar. Value = 0 'Update the progress. ProgBar.Value = NewValue 'Turn drag to Automatic, and allow time for repaint. ProgBar.DragMode = 1 DoEvents End Sub MORE INFORMATION
Steps to Reproduce Problem
Private Sub Form_Click() For i = 1 To 10 UpdateProgress ProgressBar1, ProgressBar1.Value + 10 Next i End Sub |
Additional reference words: 4.00 vb4win vb432 buglist4.00
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |