X Button Event?

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
 
C

C.C. \(aka Me\)

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?
 
T

Tim Wilson

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top