关闭屏幕键盘窗口
请教。。请教。。文本框点击事件中用 Shell("c:/windows/system32/osk.exe") 调用屏幕键盘并输入字符,最后以“回车键”表示输入完成同时关闭屏幕键盘窗口,请问用什么指令啊?急。。。。。
[此贴子已经被作者于2017-1-3 17:23编辑过]
Public Class Form1 Dim pInfo As New ProcessStartInfo() Private Sub TextBox1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles TextBox1.Click pInfo.FileName = "c:/windows/system32/osk.exe" Process.Start(pInfo) End Sub Private Sub TextBox1_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles TextBox1.KeyPress If e.KeyChar = Chr(13) Then KillExcelProcess() End If End Sub Private Sub KillExcelProcess() Dim myProcesses As Process() myProcesses = Process.GetProcessesByName("osk.exe") For Each myProcess As Process In myProcesses myProcess.Kill() Next End Sub End Class