使用API方式调用软键盘

    技术2022-07-01  123

    不使用 System.WindowsCE.Forms命名空间 调用软键盘方法         /// <summary>         /// 显示/隐藏软键盘         /// </summary>         /// <param name="SIP_STATUS"></param>         /// <returns></returns>         [DllImport("coredll", EntryPoint = "SipShowIM")]         private static extern bool SipShowIM(IntPtr SIP_STATUS);         private static readonly IntPtr SIPF_OFF = (IntPtr)0x0;         private static readonly IntPtr SIPF_ON = (IntPtr)0x1;         /// <summary>         /// 显示/隐藏软键盘         /// </summary>         /// <param name="visible">是否显示</param>         /// <returns></returns>         public static bool SipShowIM(bool isShow)         {             if (Platform.Equals("WinCE"))             {                 return SipShowIM(isShow ? SIPF_ON : SIPF_OFF);             }             else             {                 return false;             }         }

    最新回复(0)