Hi, Try calling "EvtAddEventToQueue" instead of "FrmDispatchEvent".
Regards, Peter http://www.whizoo.com Contractor for hire (PalmSource Certified Developer) Source code available for all apps!! BtSerial Pro - Serial Port Client for the Palm OS BtSerial - Bluetooth Serial Port Client for the Palm OS BtServer - Bluetooth Serial Port Server for the Palm OS Net Sync - Programmatically manipulate network settings RegCode - Add registration code support to your app "Ben Combee" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] At 04:03 PM 5/3/2004, you wrote: >Hey, > >Im trying to close the application down after a specific error is detected. >Ive been able to close all of the forms, although once Ive done this there >remains a white screen on the pda. > >I tried: > EventType x; > x.eType = appStopEvent; > FrmDispatchEvent(&x); > >But it didn't do anything... The application ends by returning from its event loop, which usually happens when an appStopEvent is seen by the main application event handler. The usual sequence, as seen by all the Palm OS sample code, is to check for appStopEvent after calling EvtGetEvent, and if you see it, go into some sort of stop code that calls FrmCloseAllForms, and then returns to the PilotMain which returns to the OS. If all forms are closed, FrmDispatchEvent won't do anything, as there is no active form to get the event. -- Ben Combee, DTS technical lead, PalmSource, Inc. Read "Combee on Palm OS" at http://palmos.combee.net/ -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
