Ofer Ebert

Ofer Ebert

  • NA
  • 1
  • 3.4k

Change the position of the TabTip keyboard is not working

Mar 26 2014 10:29 AM
I wrote a C# program to open and set the position of the TabTip keyboard I can open the keyboard and find the window handle by calling "FindWindow("IPTip_Main_Window",null);" using spy++ I verified that I get the correct handle when I call SetWindowsPos it returns true but the keyboard is not moving.

[DllImport("user32.dll")]
static extern bool SetWindowPos(IntPtr hWnd, IntPtr hWndInsertAfter, int X,
int Y, int cx, int cy, uint uFlags);
[DllImport("user32.dll")]
static extern IntPtr FindWindow(string ClassName, string WindowName);

IntPtr hWnd=FindWindow("IPTip_Main_Window",null);

if(hWnd!= (IntPtr)0)

{

SetWindowPos(hWnd, (IntPtr)0, ToX, ToY, 0, 0, 0x0045);
}

Any Ideas?