by http://www.coderhq.com (4 Submissions)
Category: Windows API Call/Explanation
Compatability: Visual Basic 5.0
Difficulty: Unknown Difficulty
Originally Published: Wed 9th January 2002
Date Added: Mon 8th February 2021
Rating: (1 Votes)
Lock your workstation with this simple API call
Public Declare Function LockWorkStation Lib "user32.dll" () As Long
' ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
' ~~~~~~~~~~~~~~~~~~~~
' Paste the method below into
' your form with a Command
' button named Command1
' ~~~~~~~~~~~~~~~~~~~~
Private Sub Command1_Click()
Dim retval As Long
retval = LockWorkStation()
End Sub