110,535
社区成员
发帖
与我相关
我的任务
分享
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
textBox1.KeyPress += new KeyPressEventHandler(textBox1_KeyPress);
textBox1.TextChanged += new EventHandler(textBox1_TextChanged);
}
private void textBox1_TextChanged(object sender, EventArgs e)
{
MessageBox.Show("有改变哦!");
}
private void button1_Click(object sender, EventArgs e)
{
}
private void textBox1_TextChanged(object sender, EventArgs e)
{
}
private void texyBox1_KeyPress(object senter, KeyPressEventArgs e)
{
MessageBox.Show("您操作的键盘");
}
}
可能没注册事件