Has anyone got any idea how to turn off the automatic Undo through Ctrl+Z on a RichTextBox control? I want to add a menu item with Ctrl+Z for my own, multiple, undo.
Cheers
Printable View
Has anyone got any idea how to turn off the automatic Undo through Ctrl+Z on a RichTextBox control? I want to add a menu item with Ctrl+Z for my own, multiple, undo.
Cheers
Sure! Just check for it in the KeyDown event:
Good luck!Code:Private Sub RichTextBox1_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = vbKeyZ And (Shift And vbCtrlMask) = vbCtrlMask Then
KeyCode = 0
End If
End Sub