Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6021297
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T03:41:33+00:00 2026-05-23T03:41:33+00:00

Is it possible to detected where user clicked on a loaded image or a

  • 0

Is it possible to detected where user clicked on a loaded image or a bitmap on a C# form ? . just need it to be independent to image not screen locations !

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T03:41:34+00:00Added an answer on May 23, 2026 at 3:41 am

    Well, you don’t tell us how you are displaying the image, so I am forced to guess. I am assuming a picturebox displaying the image at it’s native resolution. So, in that case:

    class MyForm : Form
    {
        public MyForm()
        {
            picturebox1.MouseDown += picturebox1_MouseDown;       
        }
    
        private void picturebox1_MouseDown( object sender, MouseEventArgs e )
        {
            if( (e.Button & MouseButtons.Left) == MouseButtons.Left )
            {
                var imagePos = e.Location; // that's it
            }
        }
    }
    

    If your image is scaled you will need to do the math. Get the Width and Height of the control and figure out the ratio between them and the dimensions of your image. Multiply the click position by that ratio.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Possible Duplicate: A potentially dangerous Request.Form value was detected from the client A potentially
Possible Duplicate: Need to cancel click/mouseup events when double-click event detected I am trying
Possible Duplicate: Why not use tables for layout in HTML? Under what conditions should
I need to determine at startup what country a user is in, for an
I'm trying to set up user-friendly captions in a DataSet which will be detected
I get the following x.cpp: In member function ‘X’: x.cpp:153:10: warning: possible problem detected
I am getting following warning: (node) warning: possible EventEmitter memory leak detected. 11 listeners
Possible Duplicate: php warning mysql_fetch_assoc i am just implementing a simple part of my
Possible Duplicate: Do I really need to encode '&' as ' &' ? I
Possible Duplicate: NAnt or MSBuild, which one to choose and when? What is the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.