C# DataGridView点击Enter键切换单元格
2020-12-13 03:40
标签:datagridview c for io window windows #region 将ENTER键转换为TAB System.Windows.Forms.SendKeys.Send("{TAB}"); } protected override bool ProcessCmdKey(ref System.Windows.Forms.Message msg, System.Windows.Forms.Keys keyData) return true; C# DataGridView点击Enter键切换单元格,搜素材,soscw.com C# DataGridView点击Enter键切换单元格 标签:datagridview c for io window windows 原文地址:http://www.cnblogs.com/myyw/p/3814844.html
protected override void OnKeyUp(System.Windows.Forms.KeyEventArgs e)
{
base.OnKeyUp(e);
if (e.KeyCode == System.Windows.Forms.Keys.Enter)
{
e.Handled = true;
}
{
switch (keyData)
{
case System.Windows.Forms.Keys.Enter:
{
System.Windows.Forms.SendKeys.Send("{TAB}");
}
}
return base.ProcessCmdKey(ref msg, keyData);
}
#endregion
文章标题:C# DataGridView点击Enter键切换单元格
文章链接:http://soscw.com/essay/28055.html