不使用 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;
- }
- }
WinCE软键盘调用
本文介绍了一种在不使用System.WindowsCE.Forms命名空间的情况下,通过PInvoke直接调用WinCE核心库coredll.dll中的SipShowIM方法来实现软键盘的显示与隐藏的技术方案。
516

被折叠的 条评论
为什么被折叠?



