Microsoft KB Archive/93233

= FIX: GP Fault or UAE When Unload Form in DragOver Event =

Article ID: 93233

Article Last Modified on 1/8/2003

-

APPLIES TO


 * Microsoft Visual Basic 2.0 Standard Edition

-



This article was previously published under Q93233



SYMPTOMS
If you place an Unload statement in the DragOver event procedure, a general protection (GP) fault or Unrecoverable Application Error (UAE) occurs depending on which version of Windows you are using.



WORKAROUND
Do not place an Unload statement in a DragOver event procedure, or use code to check to make sure that you are done dragging before trying to unload a form. For example, you might use a Timer control. Enable the timer in the DragOver event procedure by setting it to True. Then place the Unload statement in the Timer1_Timer event procedure, and disable the timer by setting the Enabled property to False in the Unload event procedure.



STATUS
Microsoft has confirmed this to be a problem in Microsoft Visual Basic programming system for Windows, version 2.0. This problem was corrected in Microsoft Visual Basic version 3.0 for Windows.



Steps to Reproduce Problem
 Start Visual Basic or from the File menu choose New Project if Visual Basic is already running. Form1 is created by default. Place a Label (Label1) on Form1. Set the DragMode property of Label1 to 1(= Automatic).  Add the following code to the Form_DragOver event procedure: Unload Form1  Press the F5 key to run the example and try to drag Label1. A GP fault or UAE occurs.</ol>

Additional query words: 2.00 3.00 GPF buglist2.00 fixlist3.00

Keywords: kbbug kbfix KB93233

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.