-
I have a richtext box which I am using as kind of a text editor (thanks to Joachim Anderson). I need to be able to force the richtext box into insertmode, without hitting the insert key so that text is overwritten without displacing anything else on the file.
Keyascii doesn't appear to pick up the insert key so I can't do it that way.
Any ideas anyone ?
-
Usually the keyascii wont pick up the special codes. Try and use the KeyCode from the keydown event.
Hope this helps,
-
-
A little ugly, but works well.
Code:
Private Sub Command1_Click()
RichTextBox1.SetFocus
SendKeys "{INSERT}"
End Sub
You can also use the KeyCode event. The code for Insert is vbKeyInsert.