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.
Asked
Active
Viewed 2,649 times
1

Jacob
- 77,566
- 24
- 149
- 228

Nime Cloud
- 6,162
- 14
- 43
- 75
3 Answers
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);