[英]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.