Hi to everyone who cared about my message.

I want to know how to delete lines in my drawing program.

Since I try to draw line, I do like this:
1. As mouse down, it is the start x and y point.
2. As mouse move, draw a line to the point that the mouse is located.

Here is a problem, As long as mouse is moving or until mouse-up, lines I have created should go away. The program just leaves the lines there. It should be just like MS paint.
If you understood my english, and know a good idea for this.
Please help me.