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

ID: Q93233


The information in this article applies to:
  • Microsoft Visual Basic programming system for Windows, version 2.0


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.


MORE INFORMATION

Steps to Reproduce Problem

  1. Start Visual Basic or from the File menu choose New Project if Visual Basic is already running. Form1 is created by default.


  2. Place a Label (Label1) on Form1.


  3. Set the DragMode property of Label1 to 1(= Automatic).


  4. Add the following code to the Form_DragOver event procedure:
    
       Unload Form1 


  5. Press the F5 key to run the example and try to drag Label1. A GP fault or UAE occurs.


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

Keywords :
Version : WINDOWS:2.0
Platform : WINDOWS
Issue type :


Last Reviewed: January 20, 2000
© 2000 Microsoft Corporation. All rights reserved. Terms of Use.