📄 form1.cs
字号:
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;
namespace TestInputPanel
{
public partial class Form1 : Form
{
Rectangle VisibleRect;
public Form1()
{
InitializeComponent();
}
private void menuItem1_Click(object sender, EventArgs e)
{
Application.Exit();
}
private void menuItem2_Click(object sender, EventArgs e)
{
Application.Exit();
}
private void inputPanel1_EnabledChanged(object sender, EventArgs e)
{
if (inputPanel1.Enabled == false)
{
// The SIP is disabled, so set the height of the tab control
// to its original height with a variable (TabOriginalHeight),
// which is determined during initialization of the form.
VisibleRect = inputPanel1.VisibleDesktop;
//tabControl1.Height = TabOriginalHeight;
panel1.Height = 248;
}
else
{
// The SIP is enabled, so the height of the tab control
// is set to the height of the visible desktop area.
VisibleRect = inputPanel1.VisibleDesktop;
//tabControl1.Height = VisibleRect.Height;
panel1.Height = VisibleRect.Height;
}
//// The Bounds property always returns a width of 240 and a height of 80
//// pixels for Pocket PCs, regardless of whether or not the SIP is enabled.
//BoundsRect = inputPanel1.Bounds;
//// Show the VisibleDestkop and Bounds values
//// on the second tab for demonstration purposes.
//VisibleInfo.Text = String.Format("VisibleDesktop: X = {0}, " +
// "Y = {1}, Width = {2}, Height = {3}", VisibleRect.X,
// VisibleRect.Y, VisibleRect.Width, VisibleRect.Height);
//BoundsInfo.Text = String.Format("Bounds: X = {0}, Y = {1}, " +
// "Width = {2}, Height = {3}", BoundsRect.X, BoundsRect.Y,
// BoundsRect.Width, BoundsRect.Height);
}
private void textBox3_GotFocus_1(object sender, EventArgs e)
{
inputPanel1.Enabled = true;
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -