RSS 2.0 | Atom 1.0 | CDF

Search

Categories

Archive

Blogroll

Sign In

# Tuesday, October 26, 2004
Tuesday, October 26, 2004 12:06:57 PM (GMT Daylight Time, UTC+01:00) ( .Net Windows Forms )

i have a windows form with a textbox inside a panel, and the following code doesn't work as expected:

private void WizardLoad(object sender, System.EventArgs e)
{
  this.txtUsername.Focus();
}

Thanks to someones post

i now know that the best way to do it is as follows:

this.ActiveControl = this.txtUsername;

It works!

Comments [1] | | # 
Sunday, September 19, 2010 12:37:07 PM (GMT Daylight Time, UTC+01:00)
tnx buddy it works great!
Amir Guterman
Name
E-mail
Home page

Comment (HTML not allowed)  

Enter the code shown (prevents robots):

Live Comment Preview