0

I want to create an application that will run in the backgournd when my computer is locked, And will be able to unlock it in certain situations.

currently I have the code to only lock the computer :

   <DllImport("user32.dll", SetLastError:=True)> Private Shared Function LockWorkStation() As <MarshalAs(UnmanagedType.Bool)> Boolean
    End Function
    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        If Not LockWorkStation() Then
            Throw New Win32Exception()
        End If
    End Sub

So how can I unlock a computer with a vb.net application ?

Green Fire
  • 720
  • 1
  • 8
  • 21

0 Answers0