Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Windows Forms / WinForm General / October 2005

Tip: Looking for answers? Try searching our database.

Capture Close Button Event

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
John - 28 Oct 2005 23:11 GMT
Hello all:

Is it possible to capture the close event of the 'X' button?

Thanks,

John
Tim Wilson - 29 Oct 2005 00:04 GMT
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
Herfried K. Wagner [MVP] - 29 Oct 2005 00:06 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.

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

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.