473,657 Members | 2,453 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 1282
Microsoft.Win32 .SystemEvents.S essionEnding
--
Justin Rogers
DigiTec Web Consultants, LLC.

<brewman> wrote in message
news:r2******** *************** *********@4ax.c om...
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
2306
by: Dotnetified | last post by:
Reposting after about 2 weeks of no response ... thanks if you can help... ---------------------------------------------------------------------------- -------------- To anyone who thinks they know it all: ;) We recently upgraded our MSDN Version of VS.NET 2002 to VS.NET 2003... Things are all working well, except we've run across a new bug or issue since our adopting of the new package.
3
2155
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... I am trying to write a webpage in Javascript. The page loads with three frames, a top, left and right frame. Depending on the users actions the background page rewrites the code for the relevant frames.
12
4721
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) My newsaccount wasn't working anymore until yesterday, so I'll try again. Question is: I know it is possible to send email with Access, but can one also automate the attachments?
3
1857
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#), but cannot use message window as the control's parent window, as this is invisible and so the html is not viewable! I have a code sample showing the problem at www.tenwisevirgins.com/Example.zip
3
1383
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 news:uwMY%23fquDHA.2308@TK2MSFTNGP11.phx.gbl... Hi Jeremy, Please try using 127.0.0.1 instead of (local) in the connection string: cnTask.ConnectionString="Data Source=127.0.0.1;" +
14
2825
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 number) linking (and sometimes compiling) becomes immensely slow, and task manager shows that link.exe (or cl.exe) is barely using any processor time, but an awful lot of RAM (around 150-200MB). I'm going to keep an eye on page faults since I can't...
4
1319
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" link for each record. - Once someone clicks on the "Edit" link, a child window pops-up. The user edits the data and submits the form. All the server code is executed and
4
1139
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 window is to close and pass back the selected date to the calling page. In classic asp i would use the following javascript when a user selected a calendar item to achieve this:
18
2956
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. If you do have any ideas I would really like to hear them. Thanks Colin - 0 - 0 - 0 - I want a glorified popup/context menu on a button that shows only when
0
8842
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8516
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8617
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7353
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6176
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5642
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4330
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
1970
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1733
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.