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

  • Home
  • SEARCH
  • 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 515169
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T07:36:01+00:00 2026-05-13T07:36:01+00:00

I have created a mouse event handler that gives me the screen coordinate (X,Y)

  • 0

I have created a mouse event handler that gives me the screen coordinate (X,Y) on a right click of the mouse.

I did that because I want to get the text ( a letter) that is located at that position.

I know how to get the XY position on the screen but I can’t figure out how to get the text or object at that position.

Need some help…

Thank you !

  • 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-13T07:36:02+00:00Added an answer on May 13, 2026 at 7:36 am

    It depends on how the text got there. Is it stored in a Label or a TextBox? If so, you can inspect those objects to find the text. If not, then the text is just a bunch of pixels. Without some sort of character recognition (which can be unreliable), there’s no way to do it.

    If you’re using Windows forms, you can use the Location property of the MouseEventArgs argument that gets passed into the MouseDown events of your controls.

    EDIT:

    Since the text is being drawn using Graphics.DrawString, there’s no context to tell you what the text is after it’s drawn unless you maintain it yourself. You could create objects that encapsulate the bounding rectangles and values of the text, and iterate through those during mouse events.

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

Sidebar

Related Questions

I have an event that triggers upon a treeview node click, this then creates
I have an <input> which has an onkeydown inline event handler. In this handler,
Let's say I have a cubic Bezier path as follows (formatted for use with
I created a custom view, which has one button and one text field ,
Sorry if there is already made such question earlier, but I have no time
I need help with a program I'm making. It's a version of Conway's Game
I'm thinking it may be beneficial to sprinkle some debug logging throughout my app
I've create the following class in Visual Studio 2010: public class Bat : Form1
This seems really easy, but it's definitely not working as expected. In WPF 4.0,
I am having some issues with a segmentation fault being caused by access to

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.