当控件无法获得焦点时(修改)
private void Form1(object sender, EventArgs e)
{
try
{
this.TextBox1.Focus();
//throw new Exception("控件无法获得焦点.");
}
catch (Exception ex)
{
ex.Message;
}
}
{
try
{
this.TextBox1.Focus();
//throw new Exception("控件无法获得焦点.");
}
catch (Exception ex)
{
ex.Message;
}
}