FIX: App.End in Unload Event Causes Error
ID: Q183420
|
The information in this article applies to:
-
Microsoft Windows CE Toolkit for Visual Basic 5.0, version 1.0
SYMPTOMS
An application error occurs in module Pvb.exe when running a VBCE
application:
pvb.exe - Application Error
The exception Breakpoint
A breakpoint has been reached.
(0x80000003) occurred in the application at location 0x0135e2ab.
CAUSE
The error occurs when a form unload event procedure includes the App.End
statement, and that form is closed using the Close button in the upper-
right corner of the display.
RESOLUTION
The following are two workarounds for this problem:
- Do not use the App.End statement in the form unload event procedure.
- Set the ControlBox property of the form to False, thereby preventing the
Close button from displaying. Provide a specific CommandButton (or
other control) for the user to close the application.
STATUS
Microsoft has confirmed this to be a problem in the Microsoft products listed
at the beginning of this article.
This problem was corrected in Windows CE Toolkit for Visual Basic 6.0.
MORE INFORMATION
Steps to Reproduce Behavior
- Create a new Windows CE Project in Visual Basic 5.0. Form1 is created by default.
- Add a CommandButton to Form1.
- Add the following code to the the code module of Form1:
Private Sub Command1_Click()
App.End
End Sub
Private Sub Form_Unload(Cancel As Integer)
App.End
End Sub
- Save the project.
- Run the project. Use the CommandButton to close the form; the error
should not occur.
- Re-run the project. Use the Close button in the upper-right corner of
the display. The error described at the beginning of this article will
occur.
REFERENCES
Books Online for Microsoft Windows CE Toolkit for Visual Basic 5.0.
Additional query words:
vbce wce page fault ipf gpf vbce5 vbce6
Keywords : kbToolkit kbVBp kbVBp500bug kbVBp600fix kbWinCE kbWinCE100 kbGrpVB
Version : WINDOWS:1.0
Platform : WINDOWS
Issue type : kbbug