Torna al Thread
Do
For e = 0 To 255
If GetAsyncKeyState(e) <> 0 Then
If e >= 48 AndAlso e <= 57 Then
NumeroDigitato = CType(DirectCast(e, Keys).ToString.Replace("D", String.Empty), Int32)
If NumeroDigitato.ToString = pos(m) Then
m += 1
Else : m = 0
End If
ElseIf Not (e >= 96 AndAlso e <= 105) Then
m = 0
End If
If e >= 96 AndAlso e <= 105 Then
NumeroDigitato = CType(DirectCast(e, Keys).ToString.Replace("NumPad", String.Empty), Int32)
If NumeroDigitato.ToString = pos(m) Then
m += 1
Else : m = 0
End If
ElseIf Not (e >= 48 AndAlso e <= 97) Then
m = 0
End If
End If
If m = Len(pwctrl) Then
MessageBox.Show("Password Corretta")
m = 0
End If
Next e
Threading.Thread.Sleep(100)
Loop