Click here to Skip to main content
15,886,068 members
Home / Discussions / Visual Basic
   

Visual Basic

 
AnswerRe: Determine Path of Windows Folder Pin
The ANZAC15-May-07 13:14
The ANZAC15-May-07 13:14 
QuestionAccess verses SQL Server [modified] Pin
Werries15-May-07 3:56
Werries15-May-07 3:56 
AnswerRe: Access verses SQL Server Pin
Dave Kreskowiak15-May-07 4:25
mveDave Kreskowiak15-May-07 4:25 
AnswerRe: Access verses SQL Server Pin
Polymorpher15-May-07 17:53
Polymorpher15-May-07 17:53 
QuestionSelect all of the text in a textbox Pin
Marcus J. Smith15-May-07 3:36
professionalMarcus J. Smith15-May-07 3:36 
AnswerRe: Select all of the text in a textbox Pin
Dave Kreskowiak15-May-07 4:17
mveDave Kreskowiak15-May-07 4:17 
GeneralRe: Select all of the text in a textbox Pin
Marcus J. Smith15-May-07 5:45
professionalMarcus J. Smith15-May-07 5:45 
AnswerRe: Select all of the text in a textbox Pin
TwoFaced15-May-07 4:22
TwoFaced15-May-07 4:22 
I've come across this question before. I can't remember if it was here or some place else. The problem is the click causes the textbox to place the cursor and clear the selection. This undoes the select all you are attempting to do on the click event. I don't recall discovering a slick way around it but I did figure out a solution.

What I did was called a procedure asyncronosly. The procedure called thread.sleep for just a few milliseconds, which in practice wasn't necessary, but I figured better play it safe. After that it called selectall. Because the procedure is called asyncronosly it fires after the textbox has done it's normal thing of placing the cursor. Thus the highlighting happens after that event and "sticks".

I'm sure you could actually do this with a timer as well. Just set the timer to fire after 10 ms or so and when it does call selectall. This should create the same delay.
GeneralRe: Select all of the text in a textbox Pin
Dave Kreskowiak15-May-07 4:30
mveDave Kreskowiak15-May-07 4:30 
GeneralRe: Select all of the text in a textbox Pin
Marcus J. Smith15-May-07 5:44
professionalMarcus J. Smith15-May-07 5:44 
GeneralRe: Select all of the text in a textbox Pin
TwoFaced15-May-07 5:55
TwoFaced15-May-07 5:55 
GeneralRe: Select all of the text in a textbox Pin
Dave Kreskowiak15-May-07 6:01
mveDave Kreskowiak15-May-07 6:01 
GeneralRe: Select all of the text in a textbox [modified] Pin
TwoFaced15-May-07 5:53
TwoFaced15-May-07 5:53 
GeneralRe: Select all of the text in a textbox Pin
Dave Kreskowiak15-May-07 6:08
mveDave Kreskowiak15-May-07 6:08 
GeneralRe: Select all of the text in a textbox Pin
TwoFaced15-May-07 6:28
TwoFaced15-May-07 6:28 
GeneralRe: Select all of the text in a textbox Pin
Dave Kreskowiak15-May-07 6:30
mveDave Kreskowiak15-May-07 6:30 
GeneralRe: Select all of the text in a textbox - Windows app Pin
Marcus J. Smith15-May-07 6:15
professionalMarcus J. Smith15-May-07 6:15 
GeneralRe: Select all of the text in a textbox [modified] Pin
Dave Kreskowiak15-May-07 6:20
mveDave Kreskowiak15-May-07 6:20 
GeneralRe: Select all of the text in a textbox Pin
TwoFaced15-May-07 6:38
TwoFaced15-May-07 6:38 
GeneralRe: Select all of the text in a textbox Pin
Dave Kreskowiak15-May-07 6:55
mveDave Kreskowiak15-May-07 6:55 
AnswerRe: Select all of the text in a textbox [modified] Pin
Xandip15-May-07 19:16
Xandip15-May-07 19:16 
QuestionDelegates are type-safe Function Pointers Pin
Sonia Gupta15-May-07 2:34
Sonia Gupta15-May-07 2:34 
AnswerRe: Delegates are type-safe Function Pointers Pin
Colin Angus Mackay15-May-07 2:37
Colin Angus Mackay15-May-07 2:37 
Questiondelegates Pin
Sonia Gupta15-May-07 2:28
Sonia Gupta15-May-07 2:28 
AnswerRe: delegates Pin
Colin Angus Mackay15-May-07 2:35
Colin Angus Mackay15-May-07 2:35 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.