日期:2014-05-18  浏览次数:20728 次

Windows程序在DataGridview中怎样用回车代替Tab
Windows程序在DataGridview中怎样用回车代替Tab

------解决方案--------------------
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);

}