标签:form txt handle this textbox for tar info system
4.2
做不来这个 我就百度了一下创建窗体
From a = new Form()
a.Show();//创建
a.Close();//关闭
4.4
代码如下:
private void textBox1_KeyDown(object sender, KeyEventArgs e)
{
if (e.KeyCode == Keys.Enter)
{
this.SelectNextControl(this.ActiveControl,true,true,true,true);
}
if (e.KeyValue == 13)
{
this.textBox2.Focus();
}
this.textBox1.KeyDown += new System.Windows.Forms.KeyEventHandler(this.EnterToTab);
this.textBox1.KeyDown += new System.Windows.Forms.KeyEventHandler(this.EnterToTab);
}
private void EnterToTab(object sender,System.Windows.Forms.KeyEventArgs e)
{
if (e.KeyValue == 13)
{
SendKeys.Send("{TAB}");
}
}
标签:form txt handle this textbox for tar info system
原文地址:http://www.cnblogs.com/djwbk/p/7639075.html