OberonPlace.com Forums  

Go Back   OberonPlace.com Forums > Developer Forums > VBA > CorelDRAW/Corel DESIGNER VBA

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 19-05-2012, 03:47
Joe Joe is offline
Member
 
Join Date: Nov 2008
Location: Latvia
Posts: 92
Send a message via Skype™ to Joe
Question Is it possible to capture an Undo event?

Hi all,

I have checked the event lists for both document and application, searched the forums and the web, but seems like this question hasn't really popped up yet.

Is it possible to detect when the user has used an Undo? I have a while loop running that in some cases may base the result on the amount of actions the user has taken, thus an Undo throws the sequence.

If it were possible to intercept the Undo happening I could store the number of actions in a global, subtract on Undo and use that to determine what to do during the loop.

Any ideas?
Reply With Quote
  #2  
Old 25-05-2012, 13:53
shelbym's Avatar
shelbym shelbym is offline
Senior Member
 
Join Date: Nov 2002
Location: Cheyenne, WY
Posts: 1,769
Blog Entries: 9
Send a message via ICQ to shelbym Send a message via AIM to shelbym Send a message via MSN to shelbym Send a message via Yahoo to shelbym
Default Undo

:-( There really isn't any support for the Undo stack in VBA, you are pretty much limited to rolling all your commands into one Undo, and being able to call Undo. Other than this, not much is there.

I agree, capturing when Undo is called would be great, or being able to skip steps and the like. :-)

-Shelby
Reply With Quote
  #3  
Old 29-05-2012, 08:29
ddonnahoe's Avatar
ddonnahoe ddonnahoe is offline
Senior Member
 
Join Date: Jan 2004
Location: Louisville, KY
Posts: 552
Send a message via ICQ to ddonnahoe Send a message via AIM to ddonnahoe Send a message via MSN to ddonnahoe Send a message via Yahoo to ddonnahoe
Default

Shelby, correct me if I'm wrong, but couldn't you capture the CTRL+Z keystroke? This wouldn't take into account the user clicking the undo icon on the tool bar, but it would be a start. Maybe find a way to disable the undo button and only allow CTRL+Z?
__________________
Sean
Waiting for a ride in the T.A.R.D.I.S.
Reply With Quote
  #4  
Old 29-05-2012, 08:34
Joe Joe is offline
Member
 
Join Date: Nov 2008
Location: Latvia
Posts: 92
Send a message via Skype™ to Joe
Default

Another option would be to implement an undo button in the macro/docker interface, but neither of these options are universal enough which should be the aim for a proper product...

Currently I have "overcome" this by adding a warning to the manual.
Reply With Quote
Reply

Tags
undo, vba


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Undo Levels bprice CorelDRAW/Corel DESIGNER VBA 1 21-10-2008 12:13
winAPI to capture a left-click? Rick Randall CorelDRAW/Corel DESIGNER VBA 3 24-07-2007 13:38
Undo several steps with one click... dungbtl CorelDRAW/Corel DESIGNER VBA 1 13-12-2004 14:21
Clearing Undo List lasergraver CorelDRAW/Corel DESIGNER VBA 4 15-08-2004 12:34
Try to capture a fill color for reuse Anonymous CorelDRAW CS 1 03-05-2004 21:48


All times are GMT -5. The time now is 10:17.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
Copyright © 2011, Oberonplace.com