Question

  Asked: Jul 9 2008   6:25 PM GMT
  Asked by: Memo


Turn off computer by a VB6 program


Visual Basic 6, VB

How can I turn off my computer by a VB6 program?

Subscribe to Alerts! Get questions and answers delivered to your Inbox.


E-mail me updates on this question



   SUBSCRIBE

hidden modal window

Answer Wiki (Improve, edit or add to this answer)


 RATE THIS ANSWER
0
Click to Vote:
  •   0
  •  0



If you are programing to get any windows xp or above machine to power off or standby there is already a tool included with the oeprating system that you can call. its called shutdown.exe and it does just that run it with the argument -i and it displays its gui (shutdown -i) try it and see if it fits your needs.
  • AddThis Social Bookmark Button

Browse more Questions and Answers on Development.

Looking for relevant Development Whitepapers? Visit the SearchWinDevelopment.com Research Library.


Discuss This Answer


You must be logged-in to discuss a question. Log-in/Register

Vatchy  |   Jul 10 2008  3:07PM GMT

You can also use this to enter stand-by or, if you have enabled hibernation, to make your computer hibernate with a single mouse click:

%windir%\System32\rundll32.exe powrprof.dll,SetSuspendState

 

Flame  |   Jul 11 2008  4:07PM GMT

Didn’t know about this one…
Thanks!