By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
458,122 Members | 1,554 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 458,122 IT Pros & Developers. It's quick & easy.

Draw a Rectangle?

P: n/a
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
Share this Question
Share on Google+
6 Replies


P: n/a
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

P: n/a
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

P: n/a
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

P: n/a
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

P: n/a
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

P: n/a
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.