473,398 Members | 2,404 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,398 software developers and data experts.

Picturebox Click Coordinates

Hi all,

I'm not sure where to start. Using a PictureBox's click event:

private void pb_Click(object sender, EventArgs e)
{
// ???
}

....how would I retrieve the coordinates of the mouse click in relation
to the image? In other words, would it be possible to determine the
pixel coordinates of the mouse's position?

Thanks.
Nov 16 '05 #1
1 11875
Try using the MouseUp event instead of the click event. The
mouseEventHandler defines the X and the Y co-ordinate properties.

- Shuvro

"Typpo" <ot********@optonline.net> wrote in message
news:eM**************@TK2MSFTNGP10.phx.gbl...
Hi all,

I'm not sure where to start. Using a PictureBox's click event:

private void pb_Click(object sender, EventArgs e)
{
// ???
}

...how would I retrieve the coordinates of the mouse click in relation
to the image? In other words, would it be possible to determine the
pixel coordinates of the mouse's position?

Thanks.

Nov 16 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: kalp suth via DotNetMonster.com | last post by:
I want to create arrows using lines on a picture in the picture box. On clicking the button "btnShowAll", the image is loaded and the lines drawn. "RGSShowAll()" calls "DrawObjs()" which does the...
3
by: Tom | last post by:
I have a picturebox on my VB.NET form. The picturebox size mode is set to stretched. I then load an image into that form and display it. As the user moves the mouse over the form, I want to get and...
1
by: cmac89 | last post by:
Dear Group, I wonder if anyone can help me with a little VB.NET picturebox problem? I want to let the user click on a map and where they click I want to draw a circle. I'm using the...
3
by: emferrari | last post by:
Hi all I have a picturebox which I will have a image loaded to it and some text fields with coordinates. I am drawing a rectangle according to the coordinates in the text fields. Rectangle r...
0
by: nadylaymoud | last post by:
dear group, well..I`m a newbie when it comes to VB...I`ve been programming using the C++ for long time ...here is the problem ..I have a picture that I can get an ( x, y ) coordinates with...
5
by: toby | last post by:
Hi there, Is it possible to create an array of picturebox controls during run-time. I wish to create a new image/picturebox everytime a user clicks the button on a form, and they need to be...
3
by: Andrzej | last post by:
I have a picturebox on my C# .NET form. The picturebox size mode is set to zoom. I then load an image into that form and display it. As the user moves the mouse over the form, I want to get and...
1
by: =?Utf-8?B?Umlz?= | last post by:
Hi, I have an image displayed in a PictureBox and the displayed image is resized and centred. When I click on the image, I can get the coordinates relative to the PictureBox but I would like the...
4
by: munibe | last post by:
Hi, i have a problem about picturebox control. if you may help me, i will be so happy. i have a picturebox named pic_map, and i added a button named customer_button, my wish is to add a new small...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
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,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.