[英]ProcessTabKey(true) not working on c# splitcontainer at keydown event of windows form
我试图在Windows窗体的keydown事件中在C#splitcontainer上无法使用ProcessTabKey()
方法
public Form1()
{
InitializeComponent();
}
private void Form1_Load(object sender, EventArgs e)
{
this.BringToFront();
this.Focus();
this.KeyPreview = true;
}
private void Form1_KeyDown(object sender, KeyEventArgs e)
{
if (e.KeyCode == Keys.Enter)
{
e.Handled = true;
this.ProcessTabKey(true);
}
}
您的代码是正确的。 确保要选择的所有控件的TabStop
属性都设置为true。
使用SendKeys.send(“ {tab}”); 而不是this.ProcessTabKey(true);
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.