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
299 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
Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

 
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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Microsoft Reports are based on a report definition, which is an XML file that describes data and layout for the report, with a different extension. You can create a client-side report definition language (*.rdlc) file with Visual Studio, and build g…
Parsing a CSV file is a task that we are confronted with regularly, and although there are a vast number of means to do this, as a newbie, the field can be confusing and the tools can seem complex. A simple solution to parsing a customized CSV fi…
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.

809 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