[php] Private Sub TextBoxProcess_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBoxProcess.TextChanged
If Autoinject.Checked AndAlso tmrAutoInject.Enabled = False Then
tmrAutoInject.Start()
End If
End Sub
Private Sub Autoinject_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Autoinject.CheckedChanged
If Autoinject.Checked Then
tmrAutoInject.Enabled = True
tmrAutoInject.Interval = 100
tmrAutoInject.Start()
Else
tmrAutoInject.Stop()
tmrAutoInject.Enabled = False
End If
End Sub
Private Sub tmrAutoInject_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles tmrAutoInject.Tick
Try
TextBoxProcess.Text = TextBoxProcess.Text.Replace(".exe", "")
Dim validProc As Boolean = Process.GetProcessesByName(TextBoxProcess.Text).Ge tUpperBound(0) + 1
If validProc Then
tmrAutoInject.Stop()
Call inject()
tmrAutoInject.Enabled = False
End If
Catch ex As Exception
MsgBox("An unknown error has occured", MsgBoxStyle.Exclamation, "Warning!")
End Try
End Sub[/php]

You need a timer called tmrAutoInject.