Sep 13, 2000 #1 PZ Programmer Jul 21, 2000 18 IT In VB is there a way to reboot the pc with a code line or a statment? Thanx in advance! [sig]<p> Alex<br><a href=mailtoizzapz@libero.it>pizzapz@libero.it</a><br><a href= > </a><br>*** Q(uick)BASIC RULEZ! ***[/sig]
In VB is there a way to reboot the pc with a code line or a statment? Thanx in advance! [sig]<p> Alex<br><a href=mailtoizzapz@libero.it>pizzapz@libero.it</a><br><a href= > </a><br>*** Q(uick)BASIC RULEZ! ***[/sig]
Sep 13, 2000 #2 Maroney Programmer Sep 12, 2000 13 GB Hi, For tips like this - I have found the best site on the web to be planetsourcecode.com follow this url to get to sample code and projects for rebooting a pc: http://mh1.planet-source-code.com/v...bles=TRUE&lngWId=1&B1=Go&optSort=Alphabetical Hope this helps. [sig][/sig] Upvote 0 Downvote
Hi, For tips like this - I have found the best site on the web to be planetsourcecode.com follow this url to get to sample code and projects for rebooting a pc: http://mh1.planet-source-code.com/v...bles=TRUE&lngWId=1&B1=Go&optSort=Alphabetical Hope this helps. [sig][/sig]
Sep 13, 2000 #3 dsi Programmer Mar 13, 2000 964 US There is a FAQ for rebooting NT here. [sig][/sig] Upvote 0 Downvote
Sep 13, 2000 #4 GTO Programmer Jul 11, 2000 40 US Add the following API Declares and Constants to a BAS Module: Declare Function ExitWindowsEx& Lib "user32" (ByVal uFlags&, ByVal wReserved&) Global Const EWX_FORCE = 4 'constants needed for exiting Windows Global Const EWX_LOGOFF = 0 Global Const EWX_REBOOT = 2 Global Const EWX_SHUTDOWN = 1 Then you Shutdown/reboot/logoff windows with the following call: lresult = ExitWindowsEx(EWX_SHUTDOWN, 0&) 'shut down the computer Note: Replace the first parameter of the ExitWindowsEx function call with the appropriate CONSTANT. [sig][/sig] Upvote 0 Downvote
Add the following API Declares and Constants to a BAS Module: Declare Function ExitWindowsEx& Lib "user32" (ByVal uFlags&, ByVal wReserved&) Global Const EWX_FORCE = 4 'constants needed for exiting Windows Global Const EWX_LOGOFF = 0 Global Const EWX_REBOOT = 2 Global Const EWX_SHUTDOWN = 1 Then you Shutdown/reboot/logoff windows with the following call: lresult = ExitWindowsEx(EWX_SHUTDOWN, 0&) 'shut down the computer Note: Replace the first parameter of the ExitWindowsEx function call with the appropriate CONSTANT. [sig][/sig]