473,320 Members | 1,933 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,320 software developers and data experts.

FormClosing

Is it possible to suspend the closing of a form from the FormClosing
event handler, or any other way?
Thanks

Jan 17 '07 #1
1 5120
If by suspend, you mean cancel the closing, then yes.

protected override void OnClosing(CancelEventArgs e)
{
if(someCondition)
e.Cancel = true;
}
On Wed, 17 Jan 2007 11:15:25 +0100, dani kotlar <da*********@gmail.com
wrote:
Is it possible to suspend the closing of a form from the FormClosing
event handler, or any other way?
Thanks


--
Happy Coding!
Morten Wennevik [C# MVP]
Jan 17 '07 #2

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

Similar topics

0
by: Frank | last post by:
Hello, in the formClosing event I put an endEdit for the datagridview. Works fine. Except when the cursor is on the line for a new record. That gives errors because some fields are not filled (and...
1
by: e_man_online | last post by:
Hi, I have a VStudio 2003 project that had code like: Private Sub frmAnyForm_Closing(<parameters list...>) Handles MyBase.Closing and this project was converted to .NET 2.0 Everything...
1
by: pamelafluente | last post by:
Hi, I am not clear if there is there any difference in usage between Closing (mybase) and FormClosing ? Any advice on that ? -P
4
by: Academic | last post by:
I read the Help and some of the many Google hits I got but can't find out the difference between MyBase.Closing and MyBase.FormClosing Can anyone tell me? Thanks
13
by: Academic | last post by:
I have a MDI form, sometimes child forms and sometimes forms that are neither If I close the app the child forms closing and closed event happens followed by the Mdi form receiving the...
1
by: V | last post by:
I've got a custom control that uses a timer. Need to make sure that the timer gets shut down when the control exits. Breakpoints set on a destructor for the control do not execute, but I'd like to...
0
by: Academia | last post by:
I have a Mdi app. In FormClosing, e.CloseReason works OK in the Children. But in the Mdi form it always show UserClosing. Since the children close first I could set a global flag in them...
8
by: AAaron123 | last post by:
If I show a form with ShowDialog and Dispose it FormClosing does not appear to run. At least I think that is true. If I want FormClosing and FormClose to run am I suppose to call the forms...
2
by: Anthony P. | last post by:
Hello Everyone, I'm writing an application that will reside in the system tray once it is configured. The application also has an exit button called, creatively, ExitButton. I'm in a bit of a...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....

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.