【问题标题】:How to detect/control the SoftInputPanel?如何检测/控制 SoftInputPanel?
【发布时间】:2011-12-19 17:04:03
【问题描述】:

SoftInputPanel软输入面板SIP是显示在 Windows Mobile 设备上的屏幕键盘

如何检测到有人点击了SIP

如何以编程方式启用/禁用SIP

【问题讨论】:

    标签: c# visual-studio-2008 windows-mobile soft-input-panel


    【解决方案1】:

    没关系。

    找到一篇好文章>> HERE <<

    基本上包括using Microsoft.WindowsCE.Forms;P/Invoke

    using System;
    using System.Collections.Generic;
    using System.ComponentModel;
    using System.Data;
    using System.Drawing;
    using System.Text;
    using System.Windows.Forms;
    using Microsoft.WindowsCE.Forms;
    using System.Runtime.InteropServices;
    
    namespace Test1 {
    
      public class Form1 : Form {
    
        [DllImport("coredll.dll")]
        public static extern bool SipShowIM(int dwFlag);
    
        InputPanel sip;
    
        public Form1() {
          InitializeComponent();
          sip = new InputPanel();
          sip.EnabledChanged += new EventHandler(SIP_EnabledChanged);
        }
    
        void SIP_EnabledChanged(object sender, EventArgs e) {
          if (sip.Enabled) {
            Console.WriteLine("Enabled");
          } else {
            Console.WriteLine("Disabled");
          }
        }
    
      }
    
    }
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2012-08-20
      • 2021-04-10
      • 2015-10-21
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2012-08-29
      • 1970-01-01
      相关资源
      最近更新 更多