I have an application with a username and password entry on touchscreen. When the on screen keyboard appears, it appears on top of the username entry. I would like it to appear a little lower on the screen. I am almost certain that I am using the correct handle, as Spy++ tells me it's the same, and when I use a close method with the same handle it works.
Here is the code which I have tried.
[DllImport("user32.dll", CharSet = CharSet.Auto, CallingConvention = CallingConvention.StdCall, ExactSpelling = true, SetLastError = true)]
internal static extern void MoveWindow(IntPtr hwnd, int X, int Y, int nWidth, int nHeight, bool bRepaint);
[DllImport("user32.dll")]
public static extern IntPtr FindWindow(string lpClassName, string lpWindowName);
public void OpenAndMoveTabTipWindow()
{
// Call on screen keyboard
System.Diagnostics.Process.Start(@"C:\Program Files\Common Files\Microsoft Shared\ink\TabTip.exe");
IntPtr id;
id = FindWindow("IPTIP_Main_Window", "");
MoveWindow(id, 0, 0, 100, 100, true);
}