In my Application, I have the following code :
But this return always 0 even if I check the item in my menuCode:Private Declare Sub ExitProcess Lib "kernel32" _ (ByVal uExitCode As Long) Private lExitCode As Long Private Sub Form_Load() lExitCode = 0& End Sub Private Sub mnuExport_Click() mnuExport.Checked = IIf(mnuExport.Checked, vbUnchecked, vbChecked) If (mnuExport.Checked) Then lExitCode = 1& End Sub Private Sub Form_Terminate() ExitProcess lExitCode End Sub
And when I try to place a breakpoint on ExitProcess and execute, it causes a GPF(General Protection Fault) and VB crashes....
Anyone has knowledge of this bug or know a solution ?
Nicolas Joannidès
Visual Basic, C, ASP
[email protected]




Reply With Quote