programmatically calling Undo for active explorer

  • Thread starter Mark J. McGinty
  • Start date
M

Mark J. McGinty

Is there a way to code an event handler to perform the equivalent of the
user clicking the Edit->Undo menu option?

I need to create a folder that acts as a sort of conduit to a database. Any
items dropped into the folder are processed and data that's extracted is
sent to the server. But ideally the original item would be left in place
when the process is over. (Duplicate checking is handled, and is not an
issue.)

I realize the user could be instructed to right-click->copy or ctrl-drag. I
also realize that accidental moves to this folder could be recovered from
deleted items. But in a perfect world, the user could just drag to this
folder without thinking about it.

When the ItemAdd event occurs for this folder, it can rationally be assumed
that an item has been dragged to it, there's no reason for the user to
hand-create a message in this folder.. if they did and some unrelated
undo-able action was still pending, worst case is that action would be
silently undone. But otherwise, as far as I can think, Undo would always
pertain to items in my folder, when my handler is invoked.

(I have also taken into account that the event may not always fire, and that
some items may not be removed from my folder after Undo is called.)

So really this project is all but written, if I can get the Undo trick to
fly. Any clues?


tia,
Mark
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top