说明:
设置窗体控件的TabIndex属性,(按回车顺序设置TabIndex的大小)
//protected override void OnKeyPress(KeyPressEventArgs e) {
// if (e.KeyChar == 13) {// this.SelectNextControl(this.ActiveControl, true, false, true, true);
// }
// base.OnKeyPress(e);
//}
if (e.KeyValue == 13) {
this.SelectNextControl(this.ActiveControl, true, false, true, true);
}
base.OnKeyDown(e);
}