Solved

i have a textbox i do NOT want to have focus how do i do this with vb.net

Posted on 2004-10-18
7
291 Views
Last Modified: 2010-04-23
i have a textbox that gets highlighted when the windows form is loaded how do i have it NOT highlighted nor focus at all.

thx
Johnny
aka Pern
0
Comment
Question by:Johnny
  • 3
  • 2
  • 2
7 Comments
 
LVL 96

Expert Comment

by:Bob Learned
ID: 12341527
You could force the focus to a different control.

Bob
0
 
LVL 27

Expert Comment

by:planocz
ID: 12341530
In your properties box of the textbox change TabStop = false.
0
 
LVL 96

Assisted Solution

by:Bob Learned
Bob Learned earned 100 total points
ID: 12341543
That will only keep the text box from being part of the tab sequence, but not if clicked on with the mouse.

Bob
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
LVL 27

Accepted Solution

by:
planocz earned 400 total points
ID: 12341558
This is true. but he wanted to bypass it on the form Load.
But he could change the tab order so that it ends up being tabed last.
0
 
LVL 96

Expert Comment

by:Bob Learned
ID: 12341581
Aaah, yes, good point, at startup it is based on the tab order of the controls, so you could set the tab order correctly, so that the text box is not Tab Index 0.

Bob
0
 

Author Comment

by:Johnny
ID: 12342520
i have a few textboxes on the form i do not want any of them focused...i have no other controls on the fiorm.

is there a way to make it so the form has focus. and no controls???

thx
0
 

Author Comment

by:Johnny
ID: 12342594
i figured it out from what you all said..

i just made all the tab stops false and then made the last textbox tab index one number off last was 4 i made it 6 so it had a missing 5 for a tab stop and left that as focus..and it folled it into thinking it had a focus...

non of the textboxes have focus.

thx
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Article by: jpaulino
XML Literals are a great way to handle XML files and the community doesn’t use it as much as it should.  An XML Literal is like a String (http://msdn.microsoft.com/en-us/library/system.string.aspx) Literal, only instead of starting and ending with w…
I think the Typed DataTable and Typed DataSet are very good options when working with data, but I don't like auto-generated code. First, I create an Abstract Class for my DataTables Common Code.  This class Inherits from DataTable. Also, it can …
Delivering innovative fully-managed cloud services for mission-critical applications requires expertise in multiple areas plus vision and commitment. Meet a few of the people behind the quality services of Concerto.
A company’s greatest vulnerability is their email. CEO fraud, ransomware and spear phishing attacks are the no1 threat to a company’s security. Cybercrime is responsible for the largest loss of money to companies today with losses projected to r…

929 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now