user3560351 user3560351 - 4 months ago 19
Vb.net Question

how to kill tabtip process after starting it

I can start tabtip (virtual keyboad) in my program but for some reason I can't kill it.

This is my code:

Private tabtipProcess As Process

Private Sub t_Enter(sender As Object, e As EventArgs)
tabtipProcess = Process.Start("tabtip")
End Sub

Private Sub t_Leave(sender As Object, e As EventArgs)
tabtipProcess.Kill()
End Sub


On the line
tabtipProcess.Kill()
I get this error:


Cannot process request because the process (5312) has exited.

Answer

i'v got it:

For Each pkiller As Process In Process.GetProcesses
        If String.Compare(pkiller.ProcessName, "tabtip", True) = 0 Then
            pkiller.Kill()
        End If
    Next