📄 strinput.cs
字号:
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
namespace MyDrawApp
{
/// <summary>
/// strInput 的摘要说明。
/// </summary>
public class strInput : System.Windows.Forms.Form
{
public System.Windows.Forms.TextBox textBox1;
/// <summary>
/// 必需的设计器变量。
/// </summary>
private System.ComponentModel.Container components = null;
public strInput()
{
//
// Windows 窗体设计器支持所必需的
//
InitializeComponent();
//
// TODO: 在 InitializeComponent 调用后添加任何构造函数代码
//
}
/// <summary>
/// 清理所有正在使用的资源。
/// </summary>
protected override void Dispose( bool disposing )
{
if( disposing )
{
if(components != null)
{
components.Dispose();
}
}
base.Dispose( disposing );
}
#region Windows Form Designer generated code
/// <summary>
/// 设计器支持所需的方法 - 不要使用代码编辑器修改
/// 此方法的内容。
/// </summary>
private void InitializeComponent()
{
this.textBox1 = new System.Windows.Forms.TextBox();
this.SuspendLayout();
//
// textBox1
//
this.textBox1.Location = new System.Drawing.Point(0, 1);
this.textBox1.Multiline = true;
this.textBox1.Name = "textBox1";
this.textBox1.Size = new System.Drawing.Size(176, 24);
this.textBox1.TabIndex = 0;
this.textBox1.Text = "";
this.textBox1.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.textBox1_KeyPress);
//
// strInput
//
this.AutoScaleBaseSize = new System.Drawing.Size(6, 14);
this.ClientSize = new System.Drawing.Size(176, 24);
this.Controls.AddRange(new System.Windows.Forms.Control[] {
this.textBox1});
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
this.Name = "strInput";
this.ShowInTaskbar = false;
this.Text = "strInput";
this.ResumeLayout(false);
}
#endregion
private void textBox1_KeyPress(object sender, System.Windows.Forms.KeyPressEventArgs e)
{
//当输入回车时,关闭模式对话窗体
if( e.KeyChar == (char)13)
{
this.DialogResult = DialogResult.OK ;
}
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -