views:

63

answers:

4
+1  Q: 

Form Closing event

Hi all,

I have a smartdevice project targeting windows mobile 6. In the top right corner is an X (provided by the controlbox). i have an event on the form_closing that i was hoping would fire when the cross is clicked. But it doesnt :-(

Does anyone know why this event is not firing ???

Thanks :-) John

A: 

Hi,

There are a number of possible reasons why theis could be happening, but I seriously doubt anyone will be able to guess why in this case, without you letting us see any of your code?

Liam Bailey
+4  A: 

Set the MinimizeBox property of your form to false. It's a weird thing about WinMo forms, but the X in the corner is really a minimize button, so it doesn't actually close the form. Setting MinimizeBox to false will replace the X with an OK button, and you'll get the form closing event.

MusiGenesis
Fantastic Thanks :-)
@johnm01: you're welcome. You can go ahead and select this as the correct answer (click the check mark next to this answer).
MusiGenesis
A: 

Hi,

Got the answer :-)

I needed to set MinimizeBox=false.

Thanks to everyone :-) John