WinForm 重写ProcessDialogKey将回车响应为tab键

protected override bool ProcessDialogKey(Keys keyData)
        {
            if (keyData == Keys.Enter && !(this.ActiveControl is Button))
            {
                keyData = Keys.Tab;
            }
            return base.ProcessDialogKey(keyData);
        }
posted @ 2011-03-10 19:38  现役程序员  阅读(691)  评论(0编辑  收藏  举报