我可以在我的程序中启动tabtip(虚拟键盘)但由于某种原因我无法杀死它。
这是我的代码:
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
在tabtipProcess.Kill()
行上,我收到此错误:
无法处理请求,因为进程(5312)已退出。
答案 0 :(得分:0)
我明白了:
For Each pkiller As Process In Process.GetProcesses
If String.Compare(pkiller.ProcessName, "tabtip", True) = 0 Then
pkiller.Kill()
End If
Next