Drawing Line Using Mouse Movement event

Dec 7 2011 4:52 AM
Hi All,

I want to draw lines in a windows form (in a Panel or something) for the mouse movement.

Scenario:

Form load and when user moves mouse here and there, application should draw lines according to the path that mouse moves. basically it should not break the line until the user release the mouse button.if he try to redraw a line it should be a new line. like we do in ms paint.

Can U please give me a help to start this task. Atleast a simple tutorial for the same.

i found below two articles but couldnt come up with a solution.

http://www.c-sharpcorner.com/uploadfile/mahesh/drawing-lines-in-gdi/
http://www.c-sharpcorner.com/UploadFile/mahesh/mouse_events12232005014128AM/mouse_events.aspx

Max

Answers (7)