473,503 Members | 2,120 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Repost: Q: How to identify originator of window.close()

I asked this question last week, but received no reply so I'll try one
more time. It may be that there is no good answer.

If you have an application which overrides the onClosing event handler
how can the app determine whether the event was caused by the user
selecting the close control ('X') vs something like a system shutdown?

The sender object passed through to the event handler indicates the
event was generated by this.form in both cases. Perhaps there's a
flag set somewhere which indicates a shutdown is imminent?

thanks for any help,
Bruce
Nov 15 '05 #1
1 1275
Microsoft.Win32.SystemEvents.SessionEnding
--
Justin Rogers
DigiTec Web Consultants, LLC.

<brewman> wrote in message
news:r2********************************@4ax.com...
I asked this question last week, but received no reply so I'll try one
more time. It may be that there is no good answer.

If you have an application which overrides the onClosing event handler
how can the app determine whether the event was caused by the user
selecting the close control ('X') vs something like a system shutdown?

The sender object passed through to the event handler indicates the
event was generated by this.form in both cases. Perhaps there's a
flag set somewhere which indicates a shutdown is imminent?

thanks for any help,
Bruce

Nov 15 '05 #2

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

Similar topics

0
2289
by: Dotnetified | last post by:
Reposting after about 2 weeks of no response ... thanks if you can help... ---------------------------------------------------------------------------- -------------- To anyone who thinks they...
3
2150
by: John Ortt | last post by:
I appologise for reposting this but I have been trying to find a solution all week with no avail and I was hoping a repost might help somebody more knowledgable than myself to spot the message... ...
12
4692
by: Arno R | last post by:
Hi all, This is a repost of a message posted at october 6. The answer I got was about MapiMessages.AttachmentIndex. I think I need the MSMAPI32.OCX to use this. (I don't have this file on my PC)...
3
1845
by: Adam | last post by:
I've posted about this previously, but failed to receive a satisfactory response, so have included a code sample: I am trying to receive messages from an HTML viewer control in compact.net (c#),...
3
1380
by: Jeremy Ames | last post by:
Can someone please help with this? Unfortunately, that did not work. "Ignacio Machin ( .NET/ C# MVP )" <ignacio.machin AT dot.state.fl.us> wrote in message...
14
2802
by: Steve McLellan | last post by:
Hi, Sorry to repost, but this is becoming aggravating, and causing me a lot of wasted time. I've got a reasonably large mixed C++ project, and after a number of builds (but not a constant...
4
1314
by: Fernando Chilvarguer | last post by:
Hi, I've been trying to figure this one out for a while and I'm stalled. Here's my scenario: - a Parent window with a datagrid on it. The datagrid has pagination enabled and has an "Edit"...
4
1127
by: Adam Knight | last post by:
Hi all, I have a page containing a aspx calendar. This page appears in a pop up window via a javascript open window command. What i need to acheive is, once a user has selected a date. This...
18
2929
by: Colin McGuire | last post by:
Hi - this was posted last weekend and unfortunately not resolved. The solutions that were posted almost worked but after another 5 days of working on the code everynight, I am not further ahead....
0
7204
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
1
6998
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...
0
7464
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5586
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
4680
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3171
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3162
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
741
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
391
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.