Selecting an area on picture

rahavtom

Well-known member
Joined
Apr 2, 2004
Messages
63
Dear All!

I would like to ask for some help with a project I have in VB .NET
I want to load a picture (BMP or JPG), then to select an area on this picture (by using a kind of selection tool or click on 4 corners) and then to get the size of the selected area.
Any help of how to to it, will make me glad!

Thanks in advanced!!!
Tom Rahav.
 
Basically what you need todo is the following steps ...

- load the image into a picture box.

- in the mouse down event of the picture box, add code to store the x & y co-ordinates of the cursor

- in the mouse up event of the picture box, you do a calculation taking away the current x & y co-ordinates from those stored earlier.

You may also wish to add code to the mouse move event, to draw an actual rectangle so you can see which bit you are selecting.

If you need more help with the actuall code behind this then just say, but I dont personally know much of the VB.Net Syntax, as Ive never used it.;
 
Back
Top