⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 frmbasewithsip.cs

📁 Microsoft Mobile Development Handbook的代码,有C#,VB,C++的
💻 CS
字号:
using System;
using System.Windows.Forms;
using System.ComponentModel;

namespace CodeForChapter2
{
  public partial class frmBaseWithSIP : Form
  {
    public frmBaseWithSIP()
    {
      InitializeComponent();
    }

    // Add a TextBox to the Form and add the two event handlers
    // Add an InputPanel control to the Form
    private void textBox1_GotFocus(object sender, EventArgs e)
    {
      inputPanel1.Enabled = true;
    }

    private void textBox1_LostFocus(object sender, EventArgs e)
    {
      inputPanel1.Enabled = false;
    }

    private void inputPanel1_EnabledChanged(object sender, EventArgs e)
    {
      if (inputPanel1.Enabled)
      {
        textBox2.Top -= inputPanel1.Bounds.Height;
      }
      else
      {
        textBox2.Top += inputPanel1.Bounds.Height;
      }
    }

    private void frmBaseWithSIP_Closing(object sender, CancelEventArgs e)
    {
      // must do this to make sure the inputpanel releases 
      // its reference to this form
      inputPanel1.EnabledChanged -=
          new EventHandler(this.inputPanel1_EnabledChanged);
    }

  }
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -