PDA

Click to See Complete Forum and Search --> : [2.0] ApplicationExit windows mobile


Muk108
May 23rd, 2007, 01:16 PM
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.

jmcilhinney
May 25th, 2007, 01:54 AM
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.

Muk108
May 25th, 2007, 10:21 AM
i have tried using the closed event and nothing happens...thats why i was trying to use this other event...

jmcilhinney
May 25th, 2007, 10:54 PM
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?

Muk108
May 26th, 2007, 01:11 PM
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...

jmcilhinney
May 26th, 2007, 07:54 PM
How and where are you shutting down the app?

Muk108
May 29th, 2007, 09:09 AM
im closing it with the "OK" button in the top right corner...

jmcilhinney
May 29th, 2007, 06:01 PM
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.

Muk108
May 30th, 2007, 11:13 AM
the ok is cause my

this.MinimizeBox = false;

i dont know if that makes a difference