private void ShowInputPanel()
        {
            SIPINFO sipInfo;
            int     x = 0;
            int     y = Screen.PrimaryScreen.Bounds.Height - this.inputPanel1.Bounds.Height;

            this.inputPanel1.Enabled = true;

            sipInfo        = new SIPINFO();
            sipInfo.cbSize = (uint)Marshal.SizeOf(sipInfo);
            if (SipGetInfo(ref sipInfo))
            {
                sipInfo.rcSipRect.left = x;
                sipInfo.rcSipRect.top  = y;

                SipSetInfo(ref sipInfo);
            }
        }
 //[return: MarshalAs(UnmanagedType.Bool)]
 public static extern bool SipSetInfo(ref SIPINFO sipInfo);
Exemple #3
0
 public extern static uint SipSetInfo(SIPINFO pSipInfo);
Exemple #4
0
 public extern static uint SipSetInfo(SIPINFO pSipInfo);
        /// <summary>
        /// Sets the location of the SIP
        /// </summary>
        /// <param name="x">x coordinate of the SIP</param>
        /// <param name="y">y coordinate of the SIP</param>
        public static void SetSIPLocation(int x, int y)
        {
            try
            {
                SIPINFO info = new SIPINFO();
                info.cbSize = Marshal.SizeOf(info);

                if (SipGetInfo(out info))
                {
                    info.rcSipRect.right = (info.rcSipRect.right -
                        info.rcSipRect.left) + x;
                    info.rcSipRect.left = x;

                    info.rcSipRect.bottom = (info.rcSipRect.bottom -
                        info.rcSipRect.top) + y;
                    info.rcSipRect.top = y;

                    SipSetInfo(ref info);
                }
            }
            catch (DllNotFoundException)
            {
            }
            catch (MissingMethodException)
            {
            }
        }
 internal static extern bool SipSetInfo(ref SIPINFO sipInfo);
 internal static extern bool SipGetInfo(out SIPINFO info);