closing event

  • Thread starter Thread starter Frank Kreißel
  • Start date Start date
F

Frank Kreißel

Hi,

I have a little programm and meanwhile (with the help of you all - thanks)
it works quite well.

But there is still a problem:

When closing a form I want to catch the closing-event - this works fine,
when I submit a this.close() (for example in the click-handler of a button).
But when I close the form by pressing the blue cross on white circle in the
top right this event seems to be not fired. How can I catch this event or -
if not possible - how can I suppress that a user can close the form by this
button (diable it or something like this...)

Thankyou
Frank
 
It may not be closing, depending on what platform you're running on. To
maintain high availability of applications on Windows Mobile devices, most
applications *don't* close when you "close" them. They smart-minimize, so
they are still running. If you run your application in the debugger and if,
when you tap on that icon, the debugger doesn't show that your application
has exited, that's what's going on -- it's still running. You can change
that icon to an OK button by changing the form properties, MinimizeBox, I
think it is, set to False.

Paul T.
 
Also....the answer to your other question. If you want to stop the form from
closing in your Closing event, set the events argument of that Closing event
Cancel property to true.

Regards
Simon.
 
Back
Top