PRB: Modal Form Flickers When Exiting Form with DBGrid Control (150467)
The information in this article applies to:
- Microsoft Visual Basic Standard Edition, 32-bit, for Windows 4.0
- Microsoft Visual Basic Professional Edition, 16-bit, for Windows 4.0
- Microsoft Visual Basic Professional Edition, 32-bit, for Windows 4.0
- Microsoft Visual Basic Enterprise Edition, 16-bit, for Windows 4.0
- Microsoft Visual Basic Enterprise Edition, 32-bit, for Windows 4.0
This article was previously published under Q150467 SYMPTOMS
Under certain circumstances, unloading a form containing a DBGrid control
causes Visual Basic to hang and other open forms to flicker. After hiding
the third form of the program, the second form flickers or blinks. Under
the 16-bit edition of Visual Basic, an application error follows the
blinking, and displays the following error message:
VB caused a general protection fault in module VB.EXE at 000b:000039f3.
CAUSE
The problem is limited to the following combination of circumstances: - A project contains at least three forms with each form containing the
DBGrid control.
- The first form shows a second, modal form. The problem does not occur
if the second form is not shown modally.
- A single form creates two or more instances of the original form.
RESOLUTION
There are two possible resolutions to the problem. Either solution prevents
the problem from occurring: - Do not show the second form as a modal form.
- or -
- In the Unload event of the third form, add the following line of
code:
Me.Enabled = False
STATUS
This behavior is by design.
Modification Type: | Minor | Last Reviewed: | 7/15/2004 |
---|
Keywords: | kbprb KB150467 |
---|
|