我在窗体的载入事件中:
private void Chat_Load(object sender, System.EventArgs e)
{
this.richTextBox_Msg.Focus(); //为richTextBox控件获取输入焦点
bool aa=this.richTextBox_Msg.Focused;
this.KeyPreview=true;
}
但是还是无法获得输入焦点,跟踪发现aa=false!请问是何缘故?
在线等!
private void Chat_Load(object sender, System.EventArgs e)
{
this.richTextBox_Msg.Focus(); //为richTextBox控件获取输入焦点
bool aa=this.richTextBox_Msg.Focused;
this.KeyPreview=true;
}
但是还是无法获得输入焦点,跟踪发现aa=false!请问是何缘故?
在线等!
但是在窗体载入后的其他事件中我可以通过this.richTextBox_Msg.Focus(); 来使得richtextbox获得焦点,但是就是在窗体载入的时候不行。
我将Textbox的TabStop设置为false就可以让richbox获得焦点,请问这是怎么回事?