Solved

does pressing X control in topright of form = application.exit?

Posted on 2004-10-17
1
147 Views
Last Modified: 2010-04-23
I'm trying to do some closing statements, but it appears that when the x is clicked to close the form, the entire application quits and my form.closing procedure doesn't execute.   Is there a way around this?

thx in advance
0
Comment
Question by:OnlineNoob
1 Comment
 
LVL 7

Accepted Solution

by:
J_Mak earned 250 total points
ID: 12336344
Are you using the Form_Closing(Bbject sender, System.ComponentModel.CancelEventArgs e) event?

If you are, have a look at the following links:

http://www.syncfusion.com/FAQ/WinForms/FAQ_c95c.asp#q608q <-- 32.27
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfsystemwindowsformsformclassonclosingtopic.asp
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfsystemwindowsformsformclassclosingtopic.asp

You can manipulate how the application closes, that is you can even cancel a close procedure and keep the application running if the user changes their mind. Let me know if it helped.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This tutorial demonstrates one way to create an application that runs without any Forms but still has a GUI presence via an Icon in the System Tray. The magic lies in Inheriting from the ApplicationContext Class and passing that to Application.Ru…
Parsing a CSV file is a task that we are confronted with regularly, and although there are a vast number of means to do this, as a newbie, the field can be confusing and the tools can seem complex. A simple solution to parsing a customized CSV fi…
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
Hi friends,  in this video  I'll show you how new windows 10 user can learn the using of windows 10. Thank you.

910 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now