TextBox输入后敲击回车触发事件

1 private void tstbname_KeyPress(object sender, KeyPressEventArgs e)
2 {
3         if (e.KeyChar == 13)
4         {
5                 MessageBox.Show("哈哈");
6         }
7 }

 

posted on 2012-04-19 01:14  comcyd  阅读(656)  评论(0编辑  收藏  举报

导航