c#.net

c# change the SIP(soft input panel)

우유빛 2009. 6. 22. 16:06

foreach (InputMethod im in inputPanel1.InputMethods)
            {
                //MessageBox.Show(im.Name, im.Clsid.ToString());
                if (count == 2)
                {
                    inputPanel1.CurrentInputMethod = im;
                }
                count++;
            }


private void CtlSIP(bool b)
        {
            IntPtr sip = coreDll.FindWindow("SipWndClass", null);
            if (b)
            {
                coreDll.SetWindowPos(sip, (IntPtr)1, 204, 295, 36, 24, 0x40);
            }
            else
            {
                //Rectangle oldSize = coreDll.GetWindowRect(sip);
                coreDll.SetWindowPos(sip, (IntPtr)1, 0, 0, 0, 0, 0x04);
                // hnd, HWND_BOTTOM, 0, 0, 0, 0,SWP_NOZORDER
                //coreDll.SendMessage((IntPtr)sip, 0x0010, 0, 0);
               
            }
        }