Advertisement
Guest User

Untitled

a guest
May 5th, 2015
231
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.79 KB | None | 0 0
  1. /// <summary>
  2. /// Opens or unhides TabTip keyboard
  3. /// </summary>
  4. public static void OpenKeyBoard()
  5. {
  6. Logger.Debug("Opening keyboard");
  7. if (!File.Exists(TabTipPath)) return;
  8. var startInfo = new ProcessStartInfo(TabTipPath)
  9. {
  10. WindowStyle = ProcessWindowStyle.Hidden
  11. };
  12. Process.Start(startInfo);
  13. }
  14.  
  15. /// <summary>
  16. /// Hides TabTip Keyboard
  17. /// </summary>
  18. public static void HideKeyBoard()
  19. {
  20. Logger.Debug("Hiding keyboard");
  21. if (!File.Exists(TabTipPath)) return;
  22. const uint WM_SYSCOMMAND = 274;
  23. const uint SC_CLOSE = 61536;
  24. var keyboardWnd = FindWindow("IPTip_Main_Window", null);
  25. PostMessage(keyboardWnd.ToInt32(), WM_SYSCOMMAND, (int)SC_CLOSE, 0);
  26. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement