public void Hail() { //hail the on screen keyboard, for windows 10 tabtip is the new method System.Diagnostics.Process.Start(method == Method.TabTip ? "tabtip.exe" : "osk.exe"); if (method == Method.TabTip) { var uiHostNoLaunch = new UIHostNoLaunch(); var tipInvocationElement = uiHostNoLaunch as ITipInvocation; tipInvocationElement?.Toggle((GetDesktopWindow())); Marshal.ReleaseComObject(uiHostNoLaunch); } }
public void ShowKeyboard() { System.Diagnostics.Process[] pname = System.Diagnostics.Process.GetProcessesByName("tabtip"); if (pname.Length == 0) { string tabtipId = Environment.GetFolderPath(Environment.SpecialFolder.CommonProgramFiles) + @"\microsoft shared\ink\tabtip.exe"; TabTipProc = System.Diagnostics.Process.Start(tabtipId); } else { TabTipProc = pname[0]; } if (!IsKeyboardVisible()) { var uiHostNoLaunch = new UIHostNoLaunch(); var tipInvocation = (ITipInvocation)uiHostNoLaunch; tipInvocation.Toggle(GetDesktopWindow()); Marshal.ReleaseComObject(uiHostNoLaunch); } }