draw rectangle in canvas

Hello I have my project about draw rectangle in canvan from The coordinates

this is MouseDown Event

get Value of X,Y for coordinates start

then I’m get value of X,Y from MouseMOVE Event

then I want to draw rectangle on canvas control

I’m use :

Call Pain -> for Call Pain Event for draw pinture in canvas but Error

Use Refresh or Invalidate to cause the canvas to redraw (and trigger a Paint event).

If I’m use mouse to draw rectangle then Will adumbration of rectengle look like draw control in project

how to ?
thank you

I’m sorry. I’ve read several of your posts now, and I still don’t understand the question. Can you maybe ask it in another way?