mouse click event on Image

DavidT_macktool

Well-known member
Joined
Oct 21, 2004
Messages
502
Location
Indiana
Programming Experience
3-5
Project requirements:

After loading an image file into a viewer form - in this case a blueprint - i need to capture the location of the mouse click.
On the mouse click event I need to print the value of an integer variable on the image.
I also would like to draw a circle around the number I add to the print.

I am looking for ideas on:
How to capture the mouse location on the click.
How to add an image/number to an existing image. Image consists of an integer with a circle around it. Do you create a transparent image over the top of the existing image and merge the two? Functionality should be like adding text in Photoshop.

Research links or code examples would be greatly appriciated.

Thanks for reading.
 

Attachments

  • example.jpg
    example.jpg
    42.3 KB · Views: 51
This is GDI+ stuff. You can create a Graphics object from the PictureBox and draw temporarily over the image or from the image itself and draw permanently. As for the mouse coordinates, you'd handle the MouseDown event to get the coordinates and then use them in the Click event handler.
 
Back
Top