First, use TPaintBox.
I think you'll have to create an "offline" area to draw on, and then paint the offline on the "Onlinearea".
(E.g. Doublebuffered)
Or you can save the actual mousepositions everytime the mousepointer moves in the Image (Usine event OnMouseMove), and draw them out in the Paint-event. Then you can implement "Undo" very easy.
But I don't recommend this solutions if you are going to draw compex images Andreas Nordlund
Software developer