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

Detect logoff or shutdown

How do you detect when a system is being logged off or shutdown? In VB 6
there was a QueryUnload event that would work if you had a form, but I'm
running in a Sub Main scenario... I can't find any events to code for... Is
there a way to register with the system to be notified of the
logoff/shutdown? Thanks.

Jerry
Nov 20 '05 #1
1 1918
* "Jerry Camel" <rl*****@msn.com> scripsit:
How do you detect when a system is being logged off or shutdown? In VB 6
there was a QueryUnload event that would work if you had a form, but I'm
running in a Sub Main scenario... I can't find any events to code for... Is
there a way to register with the system to be notified of the
logoff/shutdown? Thanks.


<URL:http://dotnet.mvps.org/dotnet/samples/windowsandforms/downloads/CloseWindow.zip>

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>
Nov 20 '05 #2

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

Similar topics

8
by: Jonathan Heath | last post by:
Hi all, I have created an ASP script that enters data into an Access Database. My problem is that I'd like this script to run when the computer is shutdown or the user logs off. I think...
7
by: JonBoy | last post by:
Is it possible to put the logoff/shutdown/restart buttons on an ASP page or something similar? If so can anyone point me in the direction of some code please or where I can read how to do it ...
0
by: Allan Bredahl | last post by:
Hi All I am trying to construct an application that is able to cancel a machine shutdown, reboot or logoff. And after performing some stuff to perform the original shutdown order :...
0
by: Will Haney | last post by:
I have a .NET application that needs to perform some last moment duties upon termination. The application has no forms with one Module containing the Sub Main. How can I detect/trap the...
6
by: Jm | last post by:
Hi All I have a simple vb.net app that once run for some reason does not allow me to log off or shutdown the pc ? When i try to do so it will close my app and then will only shutdown or logoff...
8
by: Jm | last post by:
Hi All I have an app that when running if a user selects logoff or shutdown from the start menu, it will close itself but not logoff windows or shutdown. From what i have found so far its most...
2
by: mikemiller.innova | last post by:
I developed a C# Windows App that requires a user to input their real name and what they did to the server while they were online. I am going to launch the app att shutdown via a logoff script. ...
1
by: CyberSoftHari | last post by:
I want to get applications running (Showing) in Task bar (and show those applications running) and Cancel windows LogOff, Shutdown, Restart when user try to Click windows LogOff, Shutdown, Restart
1
by: Clemente | last post by:
Hi, We have a VB.Net application that is sleeping until it receives a logoff/shutdown event. We want the application running on Vista and XP. When the application receives those events it has...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
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
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,...
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...

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.