c# textbox highligted

Hi,

I don't know how not highlight my textbox since when my form
loaded, for some reason my textbox is highligted.

Thanks,
JT
jtran007Asked:
Who is Participating?
 
KiasChaos83Connect With a Mentor Commented:
You haven't given much information to go off.. so I'm going to give you the dirty answer:

textbox1.SelectionStart = 0;
textbox1.SelectionLength = 0;

Open in new window

0
 
s_chilkuryCommented:
Do you mean the text inside the textbox is been selected when the form is loaded?
0
 
jtran007Author Commented:
Hi S_chilkury,

Yes. That's correct.

JT
0
 
s_chilkuryCommented:
The text box has a TabIndex of 0 and TabStop set to true. This means that the control will be given focus when the form is displayed.

You can either give another control the 0 TabIndex (if there is one) and give the text box a different tab index (>0), or set TabFocus to false for the text box to stop this from happening.
0
 
jtran007Author Commented:
Thanks,
JT
0
All Courses

From novice to tech pro — start learning today.