【handle是什么意思】C#中e.Handle是什么意思RT

发布时间:2021-03-27 17:40:09

C#中e.Handle是什么意思RT

网友回答

【答案】 给你举个例子.如:
  TextBox的KeyPress事件.
   private void TextBox_KeyPress(object sender, KeyPressEventArgs e)
   {
   e.Handled = true;
   }
  获取或设置一个值,该值指示是否处理过 KeyPress 事件
  将 Handled 设置为 true,以取消 KeyPress 事件
  只要程序运行到
  e.Handle=true;
  就退出.而按的键无效.
以上问题属网友观点,不代表本站立场,仅供参考!