如何检测/控制SoftInputPanel?

时间:2011-11-01 17:48:01

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

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

如何检测有人点击SIP

的时间

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

enter image description here

1 个答案:

答案 0 :(得分:2)

没关系。

找到一篇好文章>> 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");
      }
    }

  }

}