i am trying to use Application.ApplicationExit += ... and i can not get this to work because it is not in my mobile form. does anyone know how to get this into my mobile form? or any other way to execute code when my application is terminating.
Printable View
i am trying to use Application.ApplicationExit += ... and i can not get this to work because it is not in my mobile form. does anyone know how to get this into my mobile form? or any other way to execute code when my application is terminating.
You don't "get something into your form" when it's simply not supported by the Compact Framework. The MSDN documentation for every type and member specifies whether it is supported in the CF and if so which versions.
I'd suggest handling the Closed event of your main form.
i have tried using the closed event and nothing happens...thats why i was trying to use this other event...
What do you mean "nothing happens"? Does the form's Closed event get raised? If so then the code within the handler will be executed. What is that code supposed to do?
well im pretty sure i would know if it got raised or not..im not and idiot...at least i hope not...i had a breakpoint set for when that function is called...and nothing happens...it appears as though the event is not being raised...
How and where are you shutting down the app?
im closing it with the "OK" button in the top right corner...
Hmmm... I thought I might be able to help but I don't actually have Mobile experience so this is obviously outside my area of expertise. I don't know anything about any OK button's in top-right corners so I can be of no further use to you I'm afraid. Sorry.
the ok is cause my
this.MinimizeBox = false;
i dont know if that makes a difference