mardi 31 mars 2015

Can I unlock a computer using vb.net application?

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 ?


Aucun commentaire:

Enregistrer un commentaire