You can use the Closed, or Closing, event of the Form. If you're using the
.NET 2.0 framework then it's recommended that you use the FormClosed, or
FormClosing, event.

Signature
Tim Wilson
.NET Compact Framework MVP
> Hello all:
>
[quoted text clipped - 3 lines]
>
> John
"John" <ohnnyj77@hotmail.com> schrieb:
> Is it possible to capture the close event of the 'X' button?
You can intercept closing a form by adding a handler to its 'Closing' event.

Signature
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>
John - 29 Oct 2005 01:10 GMT
> "John" <ohnnyj77@hotmail.com> schrieb:
>> Is it possible to capture the close event of the 'X' button?
>
> You can intercept closing a form by adding a handler to its 'Closing'
> event.
Sometimes is the simplest things that drive you nuts. I had used the
Closing event for some other code that would have prevented its use to
exit the application. However, I neglected the Closed event and it
seems to work just fine. Thank you so much for your direction.
John