Hey, I'm trying to Get my program to exit when it detects a string has been typed. I have a low level keyboard hook adding the key info to a string called logged which gets cleard every so often but a timer runs for ever looking if that string contains one of the exit codes

Code:
        Do Until i = maxcount
            If MasterArray(i) = Nothing Then
            Else
                Dim data() As String = MasterArray(i).Split(":"c)
                If logged.Contains((data(0))) Then
                    MsgBox("Typed Keyword")
                    logged = ""
                    Me.Close()

                Else
                    i = i + 1
                End If
            End If
        Loop
I get thrown no errors just the program hits not responding,

If anyone can help me out i'd appreciate it

thankyou