I have text boxes being filled by data control and or Adodc. I would like to allow the user to change the contents in typeover mode instead of doing deletes and then typing their input. How do I make the Insert key on the keyboard functional using VB6.0 Visual Studio?
LittleRockZ
Comments
: LittleRockZ
:
1.
Select the entire text in the text box (allows for instant overwrite)Private Sub txt_GotFocus()
txt.SelStart = 0
txt.SelLength = Len(txt.text)
End Sub
2. Use RichTextBox - it follows Insert key on the keyboard
: : LittleRockZ
: :
:
: 1.
: Select the entire text in the text box (allows for instant overwrite)Private Sub txt_GotFocus()
: txt.SelStart = 0
: txt.SelLength = Len(txt.text)
: End Sub
:
: 2. Use RichTextBox - it follows Insert key on the keyboard
:
: What I had in mind was an operational mode like as if I was in MS Word. Press the Insert key while anywhere in the text, and toggel between insert and overwrite. I have since found the solution, but the amount of code is more than I want to apply to the application. There are many text boxes and I did not want to build a control array just to avoid replicating the code for every text box. I went back to code similar to item 1 above.
LittleRockZ