Welcome Guest ( Log In | Register )

Discover the best free computer help!
Learn more about Geeks to Go by taking the tour. Spyware, virus, trojan, fake security or privacy alerts? Read the malware cleaning guide.
      
 
Reply to this topicStart new topic
how to programme "Undo" and "Redo" in VB6?
monkey3333sg
post Sep 25 2006, 08:46 AM
Post #1


New Member
*
Posts: 1
OS: windows xp



I am programming a flowchart programme, which is very similar to Visual Logic... I would like to programme "undo" and "redo" in the programme. Thanks...
Go to the top of the page
 
+Quote Post
ChrisWright
post Oct 2 2006, 04:51 PM
Post #2


Member
**
Posts: 34
OS: XP



Hello,

I am afraid that my knowledge in VB6 is still very rookie'ish but I would expect that the only way to include "Undo" and "Redo" functions would be to somehow store the position of each object on the screen, along with any current variables, into a (possibly large) number of variables.

Whenever an operation (other than Undo/Redo) takes place, all of the objects details should be 'saved' into these variables, so that they can be reverted to in the case of "Undo'ing". Multiple undo's however, are way beyond me, unless using the principle I have suggested is repeated. However, I expect this method could be very memory consuming, as well as far beyond my code knowledge blushing.gif

Chris Wright


This post has been edited by ChrisWright: Oct 2 2006, 04:52 PM
Go to the top of the page
 
+Quote Post
IO-error
post Oct 10 2006, 01:51 AM
Post #3


Member
***
Posts: 229
From: the Netherlands
OS: WinXP PRO SP2 [Version 5.1.2600]



It wouldn't take much memory. I'll explain why:

An average user has 512 MB of ram. Which is 512 Million bytes.
A variable takes an average of 12 characters... If you got 500 variables to save, you store 6000 characters, which is still only 6 KB.
Can anybody notice 6KB out of 512 MB?

How you think Photoshop does it? With about 25 (if I'm not mistaken) possible Undo's.

Well, Chris, your suggestion can and will work, it's just the time that it takes to script it...

Good luck on it Monkey.
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 

Collapse

> Similar Topics

    Topic Title Replies / Views Topic Information
No New Posts
0 / 756 2nd January 2008 - 08:09 PM
jimmy brown started - last by jimmy brown
No New Posts  
3 / 330 12th March 2008 - 05:46 PM
aturetsky started - last by sarahw
No New Posts  
2 / 1,338 21st June 2008 - 02:28 PM
adrianchav started - last by adrianchav
No new  
16 / 806 22nd August 2008 - 10:35 AM
voldo started - last by Rorschach112
No New Posts  
1 / 60 25th August 2008 - 01:23 AM
Sys Rq started - last by Octagonal

RSS Time is now: 7th October 2008 - 01:26 AM
Advertisements do not imply our endorsement of that product or service. The forum is run by volunteers who donate their time and expertise. We make every attempt to ensure that the help and advice posted is accurate and will not cause harm to your computer. However, we do not guarantee that they are accurate and they are to be used at your own risk.