Link to home
Start Free TrialLog in
Avatar of aferia
aferia

asked on

How to override Undo functionality from MemoEdit.

Hi I woud like to write my own undo functionality for a MemoEdit. However, the control's "KeyDown" event does not capture a CTRL+Z key down. When I press ctrl-Z the control does a one level undo. Is there a way to capture an "Undi" event of equivalent?
ASKER CERTIFIED SOLUTION
Avatar of lludden
lludden
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Try trapping the Ctrl-Z and Escape (you should also trap Escale to cancel undos) at the Form level.

In order to do so, you will need to set the KeyPreview property of the Form to True, otherwise the key events won't fire on the Form.