Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Visual Basic > VB 6 Visual Basic 6 > Pro VB 6
|
Pro VB 6 For advanced Visual Basic coders working in version 6 (not .NET). Beginning-level questions will be redirected to other forums, including Beginning VB 6.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Pro VB 6 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old July 15th, 2006, 02:51 AM
Authorized User
 
Join Date: Sep 2003
Posts: 25
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to vb_programmer Send a message via Yahoo to vb_programmer
Default How to Undo SHFileOperation action from VB code?

Hello!

I'm currently working on project in which I need to implement some Shell Operations. I'm using SHFileOperation API with different constants and flags. We all know about this API that it allows us to perform any (?) shell operation with Undo facility. Like for example, we can have FO_DELETE with FOF_ALLOWUNDO to delete file to Recycle Bin.

Now, what I want to able to do is ... allow the user of Application to Undo Shell operation (which he will perform from my Application) from within my Application interface itself. I was wondering if there is any API or flag for SHFileOperation (like FO_UNDO) which will allow me to simulate the action performed by Windows Explorer when we click Edit - Undo <undoable_action_name> menu. Is there any?

If not a direct API then can anybody please let me know if there is any other method to Undo the Shell Operation? As far as Move, Copy and Rename actions are concerned; I will be able to keep the record in a Collection object and then revert the actions. But I'm finding difficulty in reverting the Delete action! And I think if there is a Flag FOF_ALLOWUNDO then it's quite logical to have some API method to undo Shell operation in one way or the other!

Waiting for your valuable reply ...

Thanks & Regards,

Ruturaj.





Similar Threads
Thread Thread Starter Forum Replies Last Post
How to undo changes to my subform? dstein4d Access VBA 2 October 1st, 2008 11:30 AM
How do i write code to go back or undo sanderson Beginning VB 6 1 July 9th, 2008 05:10 PM
Request action on change and get no action. Help crussell Ajax 0 September 12th, 2007 11:11 AM
My UNDO wont UNDO socoolbrewster Access 2 March 22nd, 2004 08:36 PM
Undo string on graphics Dinesh22 VB.NET 2002/2003 Basics 2 January 27th, 2004 12:49 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.