I'm trying to find out a way to detect when ever the user presses CTRL -ALT - DEL or Window + L to lock the PC.
The code I'm using is
Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
If (GetAsyncKeyState(17) AndAlso GetAsyncKeyState(18) AndAlso GetAsyncKeyState(46)) Or ((GetAsyncKeyState(91) Or GetAsyncKeyState(92)) AndAlso GetAsyncKeyState(76)) Then
Msgbox ("Yes")
End If
End Sub
However, as soon as the user presses CTRL-ALT-DEL the Windows Security Screen comes up and it is too fast for VB to detect that the keys have been pressed.
I did a little reaserch on how to work around this issue and found that a GINA stub can be written which can delay the Windows Security Screen by some time say 2 secs which would be enough for VB to detect that the keys have been pressed.
Also disabling Ctrl-Alt-Del through VB does not work because it is too fast for VB and I would like not to disable CTRL-ALT-DEL
Could some one please let me know how can a GINA stub be created ???