Hi. I made a click-drag selection box in a picture box. In the picturebox Paint event hander I use
e.Graphics.DrawRectangle(pen, rectangle);
and update the rectangle and refreshe the picturebox in the mouse move event handler.
The selection box looks smooth as long as the mouse remains at the bottom-right corner (i.e. drag to right/bottom). However if I want to drag the mouse to the left or up, rectangle.X/rectangle.Y has to be re-set constantly and the box flickers very noticeably.
Is there a better/more efficient way to do the drawing? Much appreciated!