|
-
Sep 20th, 2000, 07:05 AM
#1
Thread Starter
Lively Member
Anyone know how to turn on or off the insertkey in a textbox, so when i write in the textbox i overwrite stuff there. This can be done manually by pressing the Insert key on the keyboard, but I want it to be that way in the textbox.
-
Sep 20th, 2000, 07:24 AM
#2
_______
<?>
Code:
Private Sub Command1_Click()
Text1.SelStart = 0
Text1.SelLength = Len(Text1.Text)
Text1.SetFocus
End Sub
"A myth is not the succession of individual images,
but an integerated meaningful entity,
reflecting a distinct aspect of the real world."
___ Adolf Jensen
-
Sep 20th, 2000, 07:39 AM
#3
transcendental analytic
Code:
Text1.SetFocus
SendKeys "{INSERT}"
Use  
writing software in C++ is like driving rivets into steel beam with a toothpick.
writing haskell makes your life easier:
reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.
-
Sep 20th, 2000, 07:43 AM
#4
Fanatic Member
HeSaidJoe's code is exactly correct, but I put the same code (minus the setfocus line) in the GotFocus event. That way whenever the field is entered, the text is selected and can be keyed over immediately.
Code:
Private Sub Text1_GotFocus()
Text1.SelStart = 0
Text1.SelLength = Len(Text1.Text)
End Sub
-
Sep 20th, 2000, 09:20 AM
#5
Frenzied Member
I'm sorry but I don't agree.
Kedeman's code works better (in this case) because only the characters typed are being overwritten, not all text, it's like virtually pressing the <Insert> key.
Jop - validweb.nl
Alcohol doesn't solve any problems, but then again, neither does milk.
-
Sep 26th, 2000, 06:36 AM
#6
transcendental analytic
That's how i interpreted the qwestion 
Use  
writing software in C++ is like driving rivets into steel beam with a toothpick.
writing haskell makes your life easier:
reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|