Tclywork's BLog
===========================================================
C#中Windows通用的回车转Tab方法(收藏)
===========================================================
C#中Windows通用的回车转Tab方法(收藏)
原来一直是为每个文本框的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);
tclywork 发表于:2006.11.20 11:54 ::分类: ( 程序开发 ) ::阅读:(167次) :: 评论 (0)

发表评论
标题

在此添加评论
表情符号: smile laughing tongue angry crying sad wassat wink

称呼

邮箱地址(可选)

个人主页(可选)

 authimage


自我介绍
切换风格
新闻聚合
博客日历
文章归档...
最新发表...
最新评论...
最多阅读文章...
最多评论文章...
博客统计...
网站链接...