|
-
Feb 15th, 2001, 11:04 AM
#2
Addicted Member
Here's a tip from this very site.
Copy the following code into the declarations section of a module:
Public Const EWX_LOGOFF = 0
Public Const EWX_SHUTDOWN = 1
Public Const EWX_REBOOT = 2
Public Const EWX_FORCE = 4
Declare Function ExitWindowsEx Lib "user32" Alias _
"ExitWindowsEx" (ByVal uFlags As Long, ByVal dwReserved _
As Long) As Long
If you wanted to forcefully reboot the computer use the following code:
t& = ExitWindowsEx(EWX_FORCE Or EWX_REBOOT, 0)
HTH
G
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|