Go homepage(回首页) Upload pictures (上传图片) Write articles (发文字帖)
The author:(作者)delvpublished in(发表于) 2014/1/6 9:06:00 C#中Windows通用的回车转Tab方法_[Asp.Net教程]
if(e.KeyChar = '\r') SendKeys.Send("{TAB}");
最近想想,其实有更简单的方法,把Form的KeyPreView设为true,然后在Form的KeyPress中增加下列代码即可:
if (e.KeyChar == '\r') this.SelectNextControl(this.ActiveControl, true, true, true, true);
来源:网络
赞