BUG: Progress Bar Does Not Paint When DragMode Automatic (150219)
The information in this article applies to:
- Microsoft Visual Basic Standard Edition, 32-bit, for Windows 4.0
- Microsoft Visual Basic Professional Edition, 32-bit, for Windows 4.0
- Microsoft Visual Basic Enterprise Edition, 32-bit, for Windows 4.0
This article was previously published under Q150219 SYMPTOMS
If 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.
STATUS
Microsoft has confirmed this to be an issue in the Microsoft products
listed at the beginning of this article.
RESOLUTION
Set 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
Modification Type: | Minor | Last Reviewed: | 7/14/2004 |
---|
Keywords: | kbBug KB150219 |
---|
|