I\'m trying to code an whiteboard program so I need to have something like Ctrl-Z (Undo) function in it. If someone knows the answer please tell me.