simulate system events (such as shutdown, log off, etc)

Hitoruna

Member
Joined
Sep 12, 2017
Messages
11
Programming Experience
5-10
If I have build an application using visual studio that do something when some system event happens, how can I simulate such system events so that I can debug the application?
 
If I have build an application using visual studio that do something when some system event happens, how can I simulate such system events so that I can debug the application?
I don't know of a way to simulate that, but what I do is have a VM (I used VMware Player Free) and have WinXP, Win7, & Win8 VM's so I can load one up to test a program on that version of Windows since my main machine is Win10. That being said you can use the VM to test a program that does something when Windows shuts down or logs off because it's super easy to let the VM shut down/restart without disrupting you on your actual computer nor do you have to buy another computer just for testing.
 
See what you can find out regarding WM_QUERYENDSESSION and WM_ENDSESSION messages, these are sent when causing SystemEvents.SessionEnding/SessionEnded event.
 
Back
Top Bottom