Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

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.

Posted

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 don't personally know much of the VB.Net Syntax, as I've never used it.;

Anybody looking for a graduate programmer (Midlands, England)?

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...