X Button Event?

  • Thread starter Thread starter forumnewbie2006
  • Start date Start date
F

forumnewbie2006

Hello,

Can you please tell me how to capture the "X" button event on cf.net
v1.1 and PPC 2003?

I was under the impression that it should trigger the Close event, but
none of the following appear to get called when I hit the X button:

private void MyForm_Closing(object sender,
System.ComponentModel.CancelEventArgs e);

protected override void
OnClosing(System.ComponentModel.CancelEventArgs e);

protected override void Dispose( bool disposing );

private void MyForm_Closed(object sender, System.EventArgs e);

protected override void OnClosed(EventArgs e);

Thanks a bunch in advance!

- joyce
 
The X on a PPC app does not actually perform a "close" in the way you are
used to. It actually just hides the program but it remains in memory. You
may want to have a menu option to close your application out of memory by
calling Close() on your main application form.

There may be a way to get notified of the X button being pressed I am not
sure. It may be something like a Deactivate event or something?
 
The "X" is the smart minimize button. Set the MinimizeBox property of the
Form to false and you should see the "X" turn into "OK". Once you tap "OK"
then the Form will close.
 
Back
Top