Form Closing event
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 ???
Than开发者_C百科ks :-) John
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.
Read this: http://msdn.microsoft.com/en-us/library/system.windows.forms.form.closing.aspx
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?
精彩评论