Visual Basic Does Not Generate Paint Events when Msgbox Active

ID Number: Q76557

1.00

WINDOWS

buglist1.00

Summary:

Visual Basic will not execute the Paint Event for controls or forms

of an application with an active message box. The Paint Event only

occurs when the controls and/or forms have the AutoRedraw property set

to False and a MsgBox function or statement is active.

Microsoft has confirmed this to be a problem in Microsoft Visual Basic

programming system version 1.0 for Windows. We are researching this

problem and will post new information here as it becomes available.

More Information:

The following code demonstrates the problem:

Sub Form_Click ()

MsgBox "Move Me.."

End Sub

Sub Form_Paint ()

Line (0, 0)-(ScaleWidth - 1, ScaleHeight - 1), &HFF, BF

End Sub

When the code is executed in the Visual Basic environment, you should

be able to click on the form to display the MsgBox. By dragging the

message box around on the form, you will notice that the red color of

the form is not updated and the default color of the form is

displayed. If the forms paint event is executed, the form will

maintain the red color.

Additional reference words: 1.00