Home > Articles > Web Services > XML

VB.NET + XML = Undo/Redo

  • Print
  • + Share This
Many commercial applications provide undo and redo features, but implementing them in your own application can be difficult. This article shows you how to use XML to implement undo and redo features relatively easily. Using XML serializations, an application can store a series of data states and restore any of them.
Like this article? We recommend

Like this article? We recommend

It would take 100 accountants 100 years to mess things up as much as a computer can in 1/100th of a of a second.

Do Undo Others

That people make mistakes is a fact of life. Practically every non-trivial commercial software product helps protect its users from mistakes by letting them undo their changes. If the user makes a mistake, a keystroke or click of the mouse fixes it. If the user decides that undoing the mistake was itself a mistake, he can reapply the original changes with another keystroke or mouse click.

Not only do undo and redo make the user's job easier, but they also encourage the user to explore the application. If the user can experiment while knowing that any changes are only temporary, he can look around and learn more about the program.

Although undo and redo are standard features in commercial software, they are a bit mysterious to the average Visual Basic developer. This article explains how to implement undo and redo relatively painlessly using XML serializations.

  • + Share This
  • 🔖 Save To Your Account