zoukankan      html  css  js  c++  java
  • 用VS2008,C#在WINCE6.0,软键盘显示隐藏方法

            /// <summary> 
            /// 显示/隐藏 软键盘 方法1      
            /// </summary>
            ///
            public static InputPanel _softKeyBoard = new InputPanel();

            public static void ShowHideSoftKeyBoard(Boolean isShow)
            {
                _softKeyBoard.Enabled = isShow;
            }

            /// <summary>
            /// 显示/隐藏 软键盘 方法2      
            /// </summary>
            /// <param name="isShow"></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;

            public static bool SipShowIM(bool isShow)
            {
                return SipShowIM(isShow ? SIPF_ON : SIPF_OFF);
            }

    例如在tbSend输入获取焦点时,显示软键盘,逝去焦点时隐私软键盘,方法

            private void tbSend_LostFocus(object sender, EventArgs e)
            {
                Common.SipShowIM(false);
            }

            private void tbSend_GotFocus(object sender, EventArgs e)
            {
                Common.SipShowIM(true);
            }

  • 相关阅读:
    MyEclipse 2015反编译插件安装
    RocketMQ事务消费和顺序消费详解
    Rocket重试机制,消息模式,刷盘方式
    前端js上传文件 到后端接收文件
    Junit进行单元测试
    json简单使用
    valgrind的使用--检测内存
    使用scrapy框架爬取自己的博文(3)
    使用scrapy框架爬取自己的博文
    Scrapy下xpath基本的使用方法
  • 原文地址:https://www.cnblogs.com/liujicai/p/3568526.html
Copyright © 2011-2022 走看看