work hard work smart

专注于Java后端开发。 不断总结,举一反三。
  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

C#中e.Handle是什么意思

Posted on 2011-10-26 10:33  work hard work smart  阅读(4198)  评论(0编辑  收藏  举报

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

举个例子:

private void TextBox_KeyPress(object sender, KeyPressEventArgs e)

{          

     e.Handled = true;     

 }

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