473,320 Members | 2,110 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

How do I select text in textbox (highlighted) like I used to do in VB 6?

Hi,

Can't figure out how to highlight text in a textbox for reentry of input.
Used to do it with SelectLength and SelectStart but this doesn't seem to
work with .NET.

Ideas?

TIA,

Larry Woods
Nov 20 '05 #1
1 2802
Cor
Larry,
Did you know that the Enter event is not a keyboard event but has the
oposite meaning from leave control.
"Enter, gotfocus, leave, validating, validated, lostfocus"
Maybe you did want to use this, but I doubt it,
I think you want a button or something or a keyevent like keydown.
Just some guesses
Cor
Nov 20 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: coco | last post by:
Hello everyone I have a question, How can I search a string (called TextBox1.Text) in "e.Item.Cells(0).Text" and if this string exist, then it will be highlighted (yellow), only the string. ...
1
by: GGerard | last post by:
Hello When tabbing in a textbox that contains text, the text string is usually highlighted so that if the user starts typing new text in the textbox, the old text is erased. Is there a way...
3
by: Phill | last post by:
I thought when you tabbed into a textbox that the text it contained was automatically highlighted. This use to be the default in win32. Is there an easy way to do this in .NET. I don't want this...
1
by: Shane | last post by:
I have a text box select items in a listview as text is being typed into the text box. I get the select bar to move correctly in the Listview control. If the user presses the down or up key in...
8
by: cj | last post by:
I asked this question a couple of days ago but am just now looking at it again. I used to use the textbox gotfoucs event to have all the text in the textbox selected when it gotfocus. That...
3
by: njuneardave | last post by:
Hey, Here is a quick question: I have two forms that I am using, and I need to highlight the text in Form1 by clicking and dragging (obviously). So, when I switch to Form2 (making it the focused...
3
by: trpost | last post by:
I want to be able to select a word when I highlight over any part of the word. When I say select the word, I want it to be highlighted as if I left clicked my mouse and dragged the cursor along the...
2
by: Annath | last post by:
I know this is normal operation for the C# TextBox control, but it will not show highlighted text as being highlighted until focus is given to that particular control. I was wondering, is it possible...
3
by: plonk | last post by:
Hi I have a teeny problem that I cannot solve. I load HTML Source into a textbox and have a "find' button that searches through the text using the Instr Function, and highlights the result...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.