469,363 Members | 2,484 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,363 developers. It's quick & easy.

Draw a Rectangle?

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
Nov 21 '05 #1
6 4570
Hi,
http://www.vb-helper.com/howto_net_rubberband_line.html
Ken
----------------
"Brad Shook" <bs****@echd.org.removeme> wrote in message
news:un**************@TK2MSFTNGP15.phx.gbl...
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

Nov 21 '05 #2
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,
"Ken Tucker [MVP]" <vb***@bellsouth.net> wrote in message
news:ut**************@TK2MSFTNGP10.phx.gbl...
Hi,
http://www.vb-helper.com/howto_net_rubberband_line.html
Ken
----------------
"Brad Shook" <bs****@echd.org.removeme> wrote in message
news:un**************@TK2MSFTNGP15.phx.gbl...
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

Nov 21 '05 #3
Is this rectangle a solid line or are you after a selection tool effect?

Landers

"Brad Shook" <bs****@echd.org.removeme> wrote in message
news:un**************@TK2MSFTNGP15.phx.gbl...
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

Nov 21 '05 #4
A highlighting effect on a picture. like a light yellow filled rectangle
that is opacity about 75%.

"Landley" <ne**@creations-software.co.uk> wrote in message
news:Ox**************@TK2MSFTNGP11.phx.gbl...
Is this rectangle a solid line or are you after a selection tool effect?

Landers

"Brad Shook" <bs****@echd.org.removeme> wrote in message
news:un**************@TK2MSFTNGP15.phx.gbl...
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


Nov 21 '05 #5
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!
"Brad Shook" <bs****@echd.org.removeme> wrote in message
news:uO**************@tk2msftngp13.phx.gbl...
A highlighting effect on a picture. like a light yellow filled rectangle
that is opacity about 75%.

"Landley" <ne**@creations-software.co.uk> wrote in message
news:Ox**************@TK2MSFTNGP11.phx.gbl...
Is this rectangle a solid line or are you after a selection tool effect?

Landers

"Brad Shook" <bs****@echd.org.removeme> wrote in message
news:un**************@TK2MSFTNGP15.phx.gbl...
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



Nov 21 '05 #6
using gdi graphic...u can move object and delete
http://www.vbdotnetheaven.com/

Brad Shook wrote:
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


Nov 21 '05 #7

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by dunkonu | last post: by
1 post views Thread by Praveen | last post: by
1 post views Thread by Rob Richardson | last post: by
3 posts views Thread by Tom | last post: by
7 posts views Thread by Mark Ingram | last post: by
reply views Thread by suresh191 | last post: by
1 post views Thread by Marylou17 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.