Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

re: undo

Status
Not open for further replies.

natashaXXX

Programmer
Sep 13, 2002
13
GB
I want an "undo" menu option on a text editor. I have no problem undoing key strokes, eg. After using backspace key or keying in characters, and then using my mnuEUndo option, but if the user decides to use mouse to select text, then menu option EditCut, and then I use the undo button it doesn't work. Any ideas.

Code for mnuEUndo:

Dim retval As Long ' return value

retval = SendMessage(MDIForm1.ActiveForm.txtNote.hWnd, EM_UNDO, ByVal CLng(0), ByVal CLng(0))

Code for mnuECut:

Clipboard.SetText MDIForm1.ActiveForm.txtNote.SelText 'put selected text in clipboard
MDIForm1.ActiveForm.txtNote.SelText = "" 'remove selected text


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top