FIX: App.End in the Form Load Event Causes Application ErrorID: Q180520
|
If the App.End method is used in the Form Load event, it will cause the following application error in PVB.EXE on the emulator:
On the device, a message box with the title "Fatal Application Error" will appear and automatically go away before it can be read.The instruction at "0x0135baa1" referenced memory at "0x00000000". The memory could not be "read".
There two possible workarounds for this bug:
Option Explicit
Dim bEndAppFlag
Private Sub Form_Activate()
If bEndAppFlag Then App.End
End Sub
Private Sub Form_Load()
On Error Resume Next
'Simulate an error
Err.Raise 53
If Err.Number <> 0 Then
'An error occurred during form load,
'so exit the app by setting our flag.
bEndAppFlag = True
End If
End Sub
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.
Private Sub Form_Load()
'WARNING: Generates a fatal application error.
App.End
End Sub
© Microsoft Corporation 1999, All Rights Reserved.
Contributions by Mike Dixon, Microsoft Corporation
Additional query words: wince vbce vbce5 vbce6
Keywords : kbToolkit kbVBp kbVBp500bug kbVBp600fix kbWinCE kbWinCE100 kbGrpVB
Version : WINDOWS:1.0
Platform : WINDOWS
Issue type : kbbug
Last Reviewed: February 25, 1999