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

Stop windows shutdown

To all,

does anyone know how to stop windows shutting down the computer? I.e. when
a user didn't save all his changes and windows tries to shutdown, the user
gets a messagebox to save the changes.

After this windows will shutdown.
--
Met vriendelijke groet / With regards / Saludos,
Moviat Automatisering
Maurice Mertens
mauricem@moviat_KillSpamWordForEMail.nl

tel: +31 162 470 534
fax: +31 162 470 502
Jul 21 '05 #1
1 1317
If you are writing a user-level app, search MSDN (.NET Filter) for
"PowerModeChangedEventHandler".

If you are writing a service, search MSDN (.NET Filter) for "ServiceProcess"
and/or "ServiceBase".

hth,
ej

"Maurice Mertens" wrote:
To all,

does anyone know how to stop windows shutting down the computer? I.e. when
a user didn't save all his changes and windows tries to shutdown, the user
gets a messagebox to save the changes.

After this windows will shutdown.
--
Met vriendelijke groet / With regards / Saludos,
Moviat Automatisering
Maurice Mertens
mauricem@moviat_KillSpamWordForEMail.nl

tel: +31 162 470 534
fax: +31 162 470 502

Jul 21 '05 #2

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

Similar topics

3
by: Senthil | last post by:
Hi, I would like to know the code for reboot and shutdown windows xp professional using VB.Net. thanx Senthil
3
by: Jan Waga | last post by:
Hello, Is there some way to control SCM timeout while starting or stopping a C# windows service? I know I can work on a different thread and quickly return from OnStart(), but I'd like my...
2
by: Simon Niederberger | last post by:
Hi I've written a Windows Service which has - several (0-100) listeners threads which spawn worker threads based on events, timers etc - several (0-300) worker threads which handle data...
2
by: 0to60 | last post by:
I have a windows service that when started creates two threads: one thread that runs a TcpListener waiting for TcpClients to connect, and another thread that reads from the resulting sockets. My...
8
by: Bill Sonia | last post by:
I've written a Windows Service to send e-mails on events like OnStart, OnStop, OnShutDown using System.Web.Mail. It works for everything but OnShutdown. My guess is that for OnShutDown, once my...
6
by: carbon_dragon | last post by:
Ok, so here is the problem. I'm working on a headless server program implemented as a .NET C# Console project. There is a UPS mounted to this server (though not a windows compliant UPS). I can only...
2
by: Brian Worth | last post by:
I have just upgraded from VB 4.0 to VB .NET 2002. One program under VB 4.0 was able to shut down or restart the (windows XP) machine using a series of API calls. (Getlasterror, GetCurrentProcess,...
1
by: Maurice Mertens | last post by:
To all, does anyone know how to stop windows shutting down the computer? I.e. when a user didn't save all his changes and windows tries to shutdown, the user gets a messagebox to save the...
3
by: IdleBrain | last post by:
Gurus, I am trying to delay Windows Shutdown/Restart to perfrom cleanup and I am using the following code: protected override void WndProc(ref Message ex)
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
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)...
1
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....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.