1

Since I've got built-in keypad so I don't need the system-wide virtual keyboard in my WPF app. I set IsHitTestVisible="False" for the textbox, but the virtual keyboard thumbnail is still visible.

Jacob
  • 77,566
  • 24
  • 149
  • 228
Nime Cloud
  • 6,162
  • 14
  • 43
  • 75

3 Answers3

0

If you want to hide the virtual keyboard after a specific method, you can do it by just writing this.Focus();

Clue
  • 119
  • 4
  • 15
0

I answered the similar question here, but it was for windows mobile 6.5; But i guess it will work on win 7 too.. Below is the code to hide keyboard icon:

//Declare Win API method
[DllImport("coredll.dll", EntryPoint="FindWindowW", SetLastError=true)]
private static extern IntPtr FindWindow(string lpClassName, string lpWindowName)

[DllImport("coredll.dll", SetLastError=true)]
[return: MarshalAs(UnmanagedType.Bool)]
private static extern bool SetWindowPos(IntPtr hWnd, IntPtr hWndInsertAfter, int x, int y, int cx, int cy, uint uFlags);

[DllImport("coredll.dll", SetLastError = true)]
    internal static extern bool MoveWindow(IntPtr hWnd, int X, int Y, int nWidth, int nHeight, bool bRepaint);

//Call FindWindow and SetWindowPos to hide keyboard icon
IntPtr hWnd = FindWindow(Nothing, "MS_SIPBUTTON");
SetWindowPos(hWnd, 1, 0, 0, 0, 0, &H80);
Community
  • 1
  • 1
Waqas
  • 6,812
  • 2
  • 33
  • 50
0

See my answer here. By setting a Registry value, you can disable the on-screen keyboard thumbnail for a certain application

Community
  • 1
  • 1
Elmy
  • 211
  • 3
  • 9