三个函数
一)
/// <summary>
/// 判断进程是否正在运行
/// </summary>
/// <param name="process"></param>
/// <returns></returns>
bool processIsRunning(string process)
{
System.Diagnostics.Process[] processes = System.Diagnostics.Process.GetProcessesByName(process); return (processes.Length != 0);
}
二)
/// <summary>
/// 开启软键盘
/// </summary>
private void ShowTabTip()
{ if (processIsRunning("TabTip") == true)
{ return; }
else
{
Process.Start(@"C:Program FilesCommon FilesMicrosoft SharedinkTabTip.exe");
}
}
三)
/// <summary>
/// 关闭系统软键盘
/// </summary>
private void KillTabTip()
{ if (processIsRunning("TabTip") == true)
{ System.Diagnostics.Process[] processes = System.Diagnostics.Process.GetProcessesByName("TabTip");
foreach (System.Diagnostics.Process proc in processes)
{ proc.Kill(); }
}
}