Draw a Rectangle?

  • Thread starter Thread starter Brad Shook
  • Start date Start date
B

Brad Shook

Can someone point me to an example or post some code on how to allow a user
to draw a rectangle on top of an image and retrieve the coordinates and
dimensions of it. They will also need to be able to move it around on the
picture and delete it.

Thanks
Brad Shook
 
Hi,


http://www.vb-helper.com/howto_net_rubberband_line.html


Ken
----------------
Can someone point me to an example or post some code on how to allow a user
to draw a rectangle on top of an image and retrieve the coordinates and
dimensions of it. They will also need to be able to move it around on the
picture and delete it.

Thanks
Brad Shook
 
Thanks, This is a good help. I am still missing a few peaces like how to
move the new object and how to delete it. Do you or anyone else have any
more examples?
Thanks,
 
Is this rectangle a solid line or are you after a selection tool effect?

Landers
 
A highlighting effect on a picture. like a light yellow filled rectangle
that is opacity about 75%.
 
Ok.

As horrible as it may seem, try creating a panel, filling the background
using the Graphics class with the designated colour and opacity, overlaying
this of the image, and tracking the mouse co-ordinates to move the control.

If this doesn't work, try using a picturebox and draw the background how you
would like to see it, and again, track the mouse co-ordinates to move the
control.

Alternatively, you could do the nice thing and look at the ControlPaint
class!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top