how to make a selection tracker?

  • Thread starter Thread starter Jeroen Ceuppens
  • Start date Start date
J

Jeroen Ceuppens

I need a selection tracker on a graphic

Idea:
left click: rectangle appear en grows when you move the mouse, again
clicking is lock te rectangle

How do you do that?
Greetz
Jeroen
 
Jeroen,

You will have to perform some custom painting in order to do this. When
the mouse is clicked down, you will have to store the point somewhere. As
the mouse moves, you will have to draw a rectangle (using the DrawRectangle
method on the Graphics class most likely). However, before you do this, you
will have to make sure that the previous rectangle that you drew (at a
different size) is erased. Then, when the mouse is let up, you can stop
tracking the movement of the mouse.

Hope this helps.
 
Back
Top