VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



Lock a Windows NT Workstation in One Line of Code

by Doctor Evil (5 Submissions)
Category: Windows API Call/Explanation
Compatability: Visual Basic 3.0
Difficulty: Beginner
Date Added: Wed 3rd February 2021
Rating: (7 Votes)

Simple. This locks a Windows NT-based computer in one line of code. This would be the same as the user pressing CTRL-ALT-DEL and pressing "Lock Computer". NOTE: You must have WinNT 5.0 or later. (that's 2000 or XP)

API Declarations
Public Declare Sub LockWorkStation Lib "user32.dll" ()

Rate Lock a Windows NT Workstation in One Line of Code

Private Sub Command1_Click()
LockWorkStation
End Sub

Download this snippet    Add to My Saved Code

Lock a Windows NT Workstation in One Line of Code Comments

No comments have been posted about Lock a Windows NT Workstation in One Line of Code. Why not be the first to post a comment about Lock a Windows NT Workstation in One Line of Code.

Post your comment

Subject:
Message:
0/1000 characters