Hi, I would like to know how can I stop windows from logging off, restart or shutdown. I want to automatically pause these operations and then send a signal to USB port and then resume the shutdown, log off or restart operation. Is it possible you can help me write the code or give me some guidelines on it as I am learning VB thanks in advance
badbloodyeyez
0
Light Poster
Recommended Answers
Jump to PostHi,
You can abort the system shutdown using AbortSystemShutdown () win32 API. Please refer this..
Jump to PostPrivate Sub Form_QueryUnload(Cancel as Integer, UnloadMode as Integer) if UnloadMode = vbAppWindows then ' // Windows Is Shutting Down ' // Instead Of This Stuff, Send Signal To USB Port retval = msgbox("Really Shutdown Windows", vbyesno) if retval = vbno then AbortSystemShutdown vbnullstring ' // Abort Localhost …
Jump to PostCompile it... put the EXE in the folder that you want to run it from, and then run it.
All 12 Replies
selvaganapathy
31
Posting Pro
Comatose
290
Taboo Programmer
Team Colleague
badbloodyeyez
0
Light Poster
Comatose
290
Taboo Programmer
Team Colleague
badbloodyeyez
0
Light Poster
Comatose
290
Taboo Programmer
Team Colleague
badbloodyeyez
0
Light Poster
Comatose
290
Taboo Programmer
Team Colleague
badbloodyeyez
0
Light Poster
badbloodyeyez
0
Light Poster
Satishsr
0
Newbie Poster
Satishsr
0
Newbie Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.