Results 1 to 4 of 4

Thread: Ins key

  1. #1

    Thread Starter
    New Member
    Join Date
    Dec 1999
    Location
    Flea
    Posts
    4

    Post

    Hi all,
    I've to put a routine in a textbox.Keypress
    that overwrite the string in the textbox...
    Thanks

  2. #2
    Junior Member
    Join Date
    Nov 1999
    Posts
    23

    Post

    Whats the question?

  3. #3

    Thread Starter
    New Member
    Join Date
    Dec 1999
    Location
    Flea
    Posts
    4

    Post

    I'm sorry for my bad english. I try to re-post the question:
    Like the old applications for DOS where to replace a string the user press the INS key and then rewrite the word or date or whatever, I need to write a routine that when I write something in a (pre-filled) TextBox it overwrites what is written....
    It has to do something like Deleting the char at the right of the cursor and replace with the pressed one... Thanks

  4. #4
    I'm about to be a PowerPoster! Joacim Andersson's Avatar
    Join Date
    Jan 1999
    Location
    Sweden
    Posts
    14,649

    Post

    Here's one way:

    Private Sub Text1_KeyPress(KeyAscii As Integer)
    If Text1.SelLength = 0 Then
    Text1.SelLength = 1
    End If
    End Sub

    Good luck!

    ------------------
    Joacim Andersson
    joacim@programmer.net
    joacim@yellowblazer.com
    www.YellowBlazer.com



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width