Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /// <summary>
- /// Opens or unhides TabTip keyboard
- /// </summary>
- public static void OpenKeyBoard()
- {
- Logger.Debug("Opening keyboard");
- if (!File.Exists(TabTipPath)) return;
- var startInfo = new ProcessStartInfo(TabTipPath)
- {
- WindowStyle = ProcessWindowStyle.Hidden
- };
- Process.Start(startInfo);
- }
- /// <summary>
- /// Hides TabTip Keyboard
- /// </summary>
- public static void HideKeyBoard()
- {
- Logger.Debug("Hiding keyboard");
- if (!File.Exists(TabTipPath)) return;
- const uint WM_SYSCOMMAND = 274;
- const uint SC_CLOSE = 61536;
- var keyboardWnd = FindWindow("IPTip_Main_Window", null);
- PostMessage(keyboardWnd.ToInt32(), WM_SYSCOMMAND, (int)SC_CLOSE, 0);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement