473,395 Members | 1,689 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

how can i capture the exit/close event when someone clicks the "x" button

as subject
Nov 15 '05 #1
3 3043
Mullin Yu <mu*******@ctil.com> wrote in message
news:#V**************@TK2MSFTNGP09.phx.gbl...
as subject

private void MyForm_Closing(object sender,
System.ComponentModel.CancelEventArgs e)
{
}
Nov 15 '05 #2
On Sat, 29 Nov 2003 15:15:46 +0800, "Mullin Yu" <mu*******@ctil.com>
wrote:
as subject

If your form is "myForm", go to the InitializeComponents method, and
in the "myForm" section, type this.Closing+= (tab-tab)

The (tab-tab) will create the nessecary method,
private void myForm_Closing(object sender, CancelEventArgs e)
{
//set e.Cancel =true to prevent exiting

}

Nov 15 '05 #3
But, I want to have a FORM-LESS application because I don't want to have the
command prompt so that I didn't choose command application.

If no form, how can I capture the application exit event??

Thanks!

Mullin

"Mullin Yu" <mu*******@ctil.com> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl...
as subject

Nov 15 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Agnes | last post by:
I need to disable the exit button in the form . However, the min. and max. button need to keep it How ? Thanks a lot From Agnes
2
by: David | last post by:
Is there anyway to get a different DialogResult or detect that the user clicked the close button on a MessageBox? I have a message box that pops up when my program first starts that only has an ok...
2
by: jsimons | last post by:
If the user accidentally clicks the X close button I'm using the following code in the form unload event to stop them from accidentally quitting Access. Private Sub Form_Unload(Cancel As...
3
by: john piper | last post by:
I want to place a button on a form. what I want is to have it as an exit button, however when a user clicks on the button I want to play a video file (full Screen) then when the video is complete,...
0
by: bloombloom | last post by:
I am gonna post my AS in hopes that someone can get a good understanding of what i am doing. So here is the code: t1.onRelease = function() { infoField._visible = true; startLoading("cc11.swf");...
5
by: allan.young | last post by:
Hi, When in gmail I'm composing a new email message and I bit the browser back button, I get a dialog that says "Your message has not been sent. Discard your message?" But if instead of...
2
by: Bruce | last post by:
Hello, I have a form in an Access 2003 application which opens maximized. Its CloseButton property is set to false. On this form I have a command button that opens a report in preview mode. ...
1
by: sreedhardasi | last post by:
Hi, I would like to call a javascript function when user clicks on browser's close button. Here is the scenario. 1. User clicks browser close button. 2. User will be displayed a popup or a...
2
by: dstork | last post by:
Anyone know how to rename the "Exit Access" command at the bottom of the Office menu. I'd like to rename it to "Exit" as I had done in previous versions of Access. I know I can disable it with ...
5
by: Tony | last post by:
I am continuing to develop an Access 2007 application which was originally converted from Access 2003. In Access 2003 I was able to disable the Access Close button in the top righthand corner of...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.