VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



Lock Workstation (Lock Computer) API CALL

by Nick Bork (2 Submissions)
Category: Windows API Call/Explanation
Compatability: Visual Basic 3.0
Difficulty: Beginner
Date Added: Wed 3rd February 2021
Rating: (2 Votes)

This line of code will allow you to lock a Windows 2000 machine. Simulates CLT+ALT+DEL and Clicking the Lock Workstations.

Rate Lock Workstation (Lock Computer) API CALL

'In a module please place the following line of code
Public Declare Function LockWorkStation Lib "user32" () As Boolean

'On a command button or Sub, please this line of code
LockWorkstation

'Please note that this can also be done by putting this line of code in a button
Shell "rundll32 user32.dll,LockWorkStation"

Download this snippet    Add to My Saved Code

Lock Workstation (Lock Computer) API CALL Comments

No comments have been posted about Lock Workstation (Lock Computer) API CALL. Why not be the first to post a comment about Lock Workstation (Lock Computer) API CALL.

Post your comment

Subject:
Message:
0/1000 characters