回车转tab
2008-07-01 08:33 Virus-BeautyCode 阅读(546) 评论(0) 编辑 收藏 举报
首先设置窗体的keypreview=true
然后再窗体的KeyPress事件中写上
if(e.KeyChar==13)
SendKeys.Send("{TAB}");
然后再窗体的KeyPress事件中写上
if(e.KeyChar==13)
SendKeys.Send("{TAB}");
private void CollectPersonalInfo_KeyPress(object sender, KeyPressEventArgs e)
{
if (e.KeyChar == 13)
SendKeys.Send("{tab}");
//this.SelectNextControl(this.ActiveControl, true, true, true, true);
}
{
if (e.KeyChar == 13)
SendKeys.Send("{tab}");
//this.SelectNextControl(this.ActiveControl, true, true, true, true);
}