5.61 How can I make the Enter Key behave like the Tab Key and move to the next cell?
http://www.syncfusion.com/FAQ/WinForms/FAQ_c44c.asp#q902q
protected override bool ProcessCmdKey(ref System.Windows.Forms.Message msg, System.Windows.Forms.Keys keyData)
{
if(msg.WParam.ToInt32() == (int) Keys.Enter)
{
SendKeys.Send("{Tab}");
return true;
}
return base.ProcessCmdKey(ref msg, keyData);
}
http://www.syncfusion.com/FAQ/WinForms/FAQ_c44c.asp#q902q
protected override bool ProcessCmdKey(ref System.Windows.Forms.Message msg, System.Windows.Forms.Keys keyData)
{
if(msg.WParam.ToInt32() == (int) Keys.Enter)
{
SendKeys.Send("{Tab}");
return true;
}
return base.ProcessCmdKey(ref msg, keyData);
}
http://www.syncfusion.com/FAQ/WinForms/FAQ_c44c.asp#q902q
function document.onkeydown()
{
if (event.keyCode == 13)
event.keyCode = 9;
}
</script>
设置所有的TEXT的ONKEYPRESS事件,指向同一个方法,向方法中传递当前TEXT的ID2——
在ONKEYPRESS事件中,使用DOCUMENT.TEXTS数组检索下一个TEXT,然后设置下一个TEXT的FOCUS。上面可能有某些拼写与引用错误,自行更正。