tatou
April 10th, 2000, 02:56 PM
The new RichTextBox control with VB6 seems to have built in cut/copy/paste functions. i'm builting a new control which extends the richtextbox, and i want to write my own cut/copy/paste functions... but i can't find a way to disable the built-in ones. please help.
prefix
April 11th, 2000, 12:37 AM
Of course you can do that. Under the richtextbox's keydown event you can write the code like this:
if shift=2 then'shift=2 that is ctrl pressed
select case keycode
Case vbKeyZ
'your undo event
Case vbKeyX
'your cut event
Case vbKeyV
'you paste event and other events if you wish to write
end select
keycode=0 'this disable the keycode sending to the richtextbox
now you can get the right evnet in it. But there's a problem, you have to write all events if you defined any other hotkeys with a CTRL press.