473,406 Members | 2,451 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

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 4766
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: dunkonu | last post by:
I am new to VB.net, can anybody help me how to create a form that ask user to enter the "WIDTH" and "HEIGHT" and draw a box display in the textbox? thanks
3
by: Richard | last post by:
I have a requirement to put a GDI style circle or rectangle border around the selected row of a datagrid/ It will overlap into the row above and below the selected row. Doing this in a the OnPaint...
1
by: Praveen | last post by:
Hello, I have a web page which will display the map of a city/place. I have a toolbar which contains 'zoom in' and 'zoom out' buttons. When the user clicks on zoom in/zoom out button, he should...
3
by: Colin McGuire | last post by:
Hi there. I have written a small procedure to draw various shapes on things. A bit of it is shown below. Private Sub drawShape(ByVal shapeType As Integer, ByRef g As Graphics) Select Case...
1
by: Rob Richardson | last post by:
Greetings! I am creating a form that will contain information that will eventually be on a label. The label has a 2-column table with lines separating the cells. I want my form to resemble the...
3
by: Tom | last post by:
Hi Hi i am trying to draw on top of a button on a standard toolbar. All i want to do is draw a small rectangle on the button to represent the selected color. I have tried the folowing code in...
7
by: Mark Ingram | last post by:
Hi, how can i draw a rounded rectange, with a border within a specified area? i.e. if i have a Rectangle with width and height of 100, how can i draw a rectange with 2 pixel border inside of the...
2
by: Andy Chen | last post by:
Hi, Now I can get the rectangle to draw, but it seems the rectangle is not visible. The following code is used to draw the rectangle. Hope someone can help. Thanks very much! SolidBrush brush...
1
by: Jeff Waskiewicz | last post by:
Hello All, I'm trying to solve a nagging problem. The goal is to draw a rectangle over the top of all the other controls on a form. Specifically, over a ChartFX control. The user would draw...
1
by: kummu4help | last post by:
hi, i want to draw rectangle based on mousedrag event. if user dragging the mouse, then the rectangle on the applet should increase or decrease basing on current mouse coordinates. i have the...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.