Jump to content

Welcome to Geeks to Go - Register now for FREE

Need help with your computer or device? Want to learn new tech skills? You're in the right place!
Geeks to Go is a friendly community of tech experts who can solve any problem you have. Just create a free account and post your question. Our volunteers will reply quickly and guide you through the steps. Don't let tech troubles stop you. Join Geeks to Go now and get the support you need!

How it Works Create Account
Photo

how to programme "Undo" and "Redo" in VB6?


  • Please log in to reply

#1
monkey3333sg

monkey3333sg

    New Member

  • Member
  • Pip
  • 1 posts
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...
  • 0

Advertisements


#2
ChrisWright

ChrisWright

    Member

  • Member
  • PipPip
  • 34 posts
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 :whistling:

Chris Wright


Edited by ChrisWright, 02 October 2006 - 04:52 PM.

  • 0

#3
IO-error

IO-error

    Member

  • Member
  • PipPipPip
  • 276 posts
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.
  • 0






Similar Topics

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

As Featured On:

Microsoft Yahoo BBC MSN PC Magazine Washington Post HP