现在的位置: 首页 > 综合 > 正文

C#中e.Handle是什么意思

2012年06月19日 ⁄ 综合 ⁄ 共 175字 ⁄ 字号 评论关闭

C#中e.Handle是什么意思 取消事件

举个例子:

private void TextBox_KeyPress(object sender, KeyPressEventArgs e)

{          

     e.Handled = true;     

 }

将 Handled 设置为 true,以取消 KeyPress 事件 只要程序运行到 e.Handle=true; 就退出。

抱歉!评论已关闭.