?
Solved

Create an Undo button

Posted on 2008-10-08
7
Medium Priority
?
1,763 Views
Last Modified: 2013-11-27
My question is simple, though I imagine the answer may end up being beyond my skill.  I have a form, which has multiple check-boxes, buttons, etc.  I want to add an 'Undo' button that will step back (even if it's only one step back, and can't go back multiple steps) whenever clicked.

I have been all around search engines trying to get even a starting point, and to my surprise, I have found very little that was any help at all to me.

If anyone can help me, it would be much appreciated, as this project's deadline is 10/10, which is in less than 2 days, lol.  If all you have is code that I can use, that is fine, but I would very much like to understand how it works so I can work with it more in the future, so an explanation, or link to a tutorial would be wonderful.
0
Comment
Question by:Sereou
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
7 Comments
 
LVL 45

Accepted Solution

by:
sunnycoder earned 750 total points
ID: 22671061
0
 
LVL 32

Expert Comment

by:Daniel Wilson
ID: 22671086
Well ... you need some structure storing the previous state of your form.

The state you need to save -- is it all checkbox values?  Text box values?

Are the elements tied to a database?

How granular does the Undo need to be?  A separate state for every character entered or check changed?  Or just a separate state for each time the thing is submitted to the DB?

Somehow you'll need to look at a trail of changes made.  And the above questions will help determine the data structure  to use for it.
0
 

Author Comment

by:Sereou
ID: 22671152
The state I need to save consists of text box values, with a few check boxes that can be ignored if need be.

Yes, the elements are tied to a database, an Access DB to be specific.

I don't need it to be every character entered, it can be a separate state for each thing submitted to the DB (not neccesarily updated via a query or what have you, but maybe if a field is deleted, or typed over?)

I'm taking a look at those links too, though I only know VB, hehe, and most of those seem to be C# or C++, so I'm slowly translating as I go =)
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 44

Expert Comment

by:Arthur_Wood
ID: 22671735
Since you are familiar with VB.NET, consider the VB.NET version of Rocky Lhotka's book:

http://books.google.co.in/books?id=AS7zAQaKt-oC&printsec=frontcover&dq=Experrt+VB.NET+2005+Business+Objects&sig=ACfU3U0SQCLKTC2VrJX5z3QssBKyroVmJg

This is precisely the same book, but written for VB.NET, as suggeted by sunnycoder's last link, above.  The examples are precisely the same, the only difference is that the code is written in VB.NET rather than C#.
0
 
LVL 44

Assisted Solution

by:Arthur_Wood
Arthur_Wood earned 750 total points
ID: 22671766
here is the link to the pages in the VB.NET version that precisely correspond to the C# code pafges from sunnycoder's link:

http://books.google.co.in/books?id=AS7zAQaKt-oC&pg=PA64&dq=.net+undo+functionality+implementation&sig=ACfU3U1WhSfINEFbiAq4M2-o8r5YkDWV_g

AW
0
 

Author Comment

by:Sereou
ID: 22672354
The information in the book looks good, I'll look over it and see if I can find a solution.  I'm not sure I have time to study the information before my deadline though.  It's looking like 'Undo' functionality will not be implemented in my project.  Thank you guys for your help, I'll respond back again as soon as I look over the book and see if I can pull it off in one day, lol.
0
 
LVL 44

Expert Comment

by:Arthur_Wood
ID: 22679547
Glad to be of assistance.

AW
0

Featured Post

NFR key for Veeam Backup for Microsoft Office 365

Veeam is happy to provide a free NFR license (for 1 year, up to 10 users). This license allows for the non‑production use of Veeam Backup for Microsoft Office 365 in your home lab without any feature limitations.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

1.0 - Introduction Converting Visual Basic 6.0 (VB6) to Visual Basic 2008+ (VB.NET). If ever there was a subject full of murkiness and bad decisions, it is this one!   The first problem seems to be that people considering this task of converting…
It’s quite interesting for me as I worked with Excel using vb.net for some time. Here are some topics which I know want to share with others whom this might help. First of all if you are working with Excel then you need to Download the Following …
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…

765 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question