[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

microsoft.public.dotnet.framework.sdk

Use a mouse to select a region from an image: What's the best way?

Yawen Chan

10/15/2002 9:08:00 AM

I have a form containing a picture box with an image showing in the picture
box. Now I want to use a mouse to select a region of an image and that
region should be resizable. What's the best way to do it?

Right now I'm just checking for the MouseDown, MouseMove and the MouseUp
events and get the coordinates of the mouse. Depending on the current
status (whether a region is being resized or selected etc), I redraw the
retangle on the screen.

Is there any better way to do this, rather than performing calculation and
case checking all the time? Should I use the clipping region or anything
from Graphics?

Thanks for helping.

Yawen