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 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

It appears that the Blur event stops the click event handler from working? I
I have an event that triggers upon a treeview node click, this then creates
I have created a mini installer in NSIS that installs patches for my application.
I have been developing a jquery widget that extends ui.mouse. The widget needs to
My plan is to create a single event that will go: Ok, the mouse
I'm trying to create a context menu, so that when you right click the
I have created a custom component that I am using, more conveniently, as a
I have an <input> which has an onkeydown inline event handler. In this handler,
I have created the following C library for reading an image: typedef struct {
I have created a skin for DotNetNuke 5.x and I attempted to do as

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.