原来一直是为每个文本框的KeyPress增加:
       if(e.KeyChar = '\r')  SendKeys.Send("{TAB}");
最近想想,其实有更简单的方法,把Form的KeyPreView设为true,然后在Form的KeyPress中增加下列代码即可:
      if (e.KeyChar == '\r')
                this.SelectNextControl(this.ActiveControl, true, true, true, true);

相关文章:

  • 2021-06-22
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-07-26
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-09-16
  • 2022-12-23
  • 2022-12-23
  • 2021-12-28
  • 2022-01-25
  • 2022-02-08
相关资源
相似解决方案