VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



Shutdown your machine using VB 6.0.

by Bhuwan Chand Joshi (69 Submissions)
Category: Windows System Services
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Wed 2nd May 2001
Date Added: Mon 8th February 2021
Rating: (1 Votes)

Shutdown your machine using VB 6.0.

API Declarations


Public Declare Function ExitWindowsEx Lib "User32" Alias "ExitWindowsEx"(ByVal uFlags as Long,ByVal dwReserved as Long) as Long



Rate Shutdown your machine using VB 6.0.




//You can execute any one call as per your requirement.
//Shut down the machine
Call ExitWindowsEx(EWX_SHUTDOWN,0)

//Power Off the machine
Call ExitWindowsEx(EWX_POWEROFF,0)

//Logoff the machine
Call ExitWindowsEx(EWX_LOGOFF,0)

//Restart your machine
Call ExitWindowsEx(EWX_REBOOT,0)

End Sub

Download this snippet    Add to My Saved Code

Shutdown your machine using VB 6.0. Comments

No comments have been posted about Shutdown your machine using VB 6.0.. Why not be the first to post a comment about Shutdown your machine using VB 6.0..

Post your comment

Subject:
Message:
0/1000 characters