title: Detect when a user presses CTRL -ALT - DEL or Window + L in VB.net
body: <p>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.</p>
  
  <p>The code I'm using is </p>
  
  <pre><code>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
  </code></pre>
  
  <p>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.</p>
  
  <p>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.</p>
  
  <p>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</p>
  
  <p>Could some one please let me know how can a GINA stub be created ???</p>