Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

MousePosition

Posted on 1997-12-29
1
119 Views
Last Modified: 2010-04-04
Hi,
I would like to know in a DBGRIDDBLClick procedure what the mouse position is (X,Y). How can I do this?
0
Comment
Question by:lizzzard
1 Comment
 
LVL 2

Accepted Solution

by:
Felixin earned 50 total points
ID: 1354832
A DBGrid is a component derived from TControl.

If you look on the events list of TControl, you will find an OnMouseMove event that you can use to get the X and Y coordinates of the mouse position.

Further, you can use the MouseCoord procedure of the DBGrid Object to transform the X and Y coordinates of the mouse, into the Row and Column of the DBGrid cell.

The only problem that you can have here, is that the OnMouseMove event does not appear in the object inspector events tab. I think you can solve the problem by inserting a line of code assigning your event handler to that event when the form is first created (using the FormCreate procedure).
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…

809 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question