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

When Windows is shuting down...

78
Hi guys.

I''m curious about what happens when windows shuts down. I have a program running that saves data into a file when the form's closing method is invoked. So when Windows shuts down, does it call this method?

Plus, i need to implement the method in a way that, when the user clicks the X button on the form, the program minimizes and a notify icon appears. The problem is if i call e.cancel, to cancel the close, Windows doesn't shut down until i manually close the program. So is there any way of solving this issue?

Thank you.
Sep 26 '07 #1
1 1189
Plater
7,872 Expert 4TB
I think there is a difference in "calls" between windows shutting down and clicking the X button.
You might have to override the message pump (WndProc() i think?) to find out what they are though.

I think it's like "kill" versus "close"
Sep 26 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: Tim Marshall | last post by:
I'm having a vexing problem with using filecopy and compactdatabase on a Jet back end I'm sure I did not have with A97. It seems to me that A2003 is much slower in shutting down the back end ldb...
3
by: kuldeep | last post by:
Hi all, I have a application developed in C# .net. The problem I face is I am unable to shutdown my machine when the exe is running. Windows is unable to close this exe an shut down. Can anyone...
4
by: andersboth | last post by:
I want to run some code when my Windows Form Application is being shut down. I want to run this code when the Application is being shut down in the following situation: 1. The App is being...
4
by: Markus Stoeger | last post by:
Hi, I have a problem with Application.Run() when Windows is shutting down. Please have a look at the copy&paste example program below. The application has no forms. It has only got a notify...
0
by: Neil | last post by:
I am trying shut down work stations that are left on over night. This works great when a user is logged in or the machine is locked but fails miserably when no body is using the work station, the...
4
by: Frank | last post by:
My program gets a WM_QUERYENDSESSION message and asks the user if it is OK to shutdown. While he's thinking about it, Windows displays a box saying the program is not responding, and if not...
3
by: =?Utf-8?B?c3dlbGxtZWw=?= | last post by:
Firstly: When I leave my windows xpsp2 computer open at the windows desktop for an hour or so, (say I go to lunch or something), when I return, the computer is totally hung up (frozen). I cannot...
2
by: =?Utf-8?B?ZGlncmVnYQ==?= | last post by:
After installing Microsoft Office 2007 + desktop search, Windows explorer began to give me all kinds of errors including a DR Watson, which I haven't seen since installing XP. I found a forum...
46
by: Carlo Milanesi | last post by:
Hello, traditionally, in C++, dynamically allocated memory has been managed explicitly by calling "delete" in the application code. Now, in addition to the standard library strings, containers,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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,...
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
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
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
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,...

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.