Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

c# textbox highligted

Posted on 2011-02-20
5
Medium Priority
?
287 Views
Last Modified: 2013-12-17
Hi,

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

Thanks,
JT
0
Comment
Question by:jtran007
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
5 Comments
 
LVL 5

Accepted Solution

by:
KiasChaos83 earned 1000 total points
ID: 34939889
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
 
LVL 9

Expert Comment

by:s_chilkury
ID: 34939945
Do you mean the text inside the textbox is been selected when the form is loaded?
0
 

Author Comment

by:jtran007
ID: 34940232
Hi S_chilkury,

Yes. That's correct.

JT
0
 
LVL 9

Expert Comment

by:s_chilkury
ID: 34940320
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
 

Author Closing Comment

by:jtran007
ID: 34940323
Thanks,
JT
0

Featured Post

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
Performance in games development is paramount: every microsecond counts to be able to do everything in less than 33ms (aiming at 16ms). C# foreach statement is one of the worst performance killers, and here I explain why.
This course is ideal for IT System Administrators working with VMware vSphere and its associated products in their company infrastructure. This course teaches you how to install and maintain this virtualization technology to store data, prevent vuln…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…

721 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question