Solved

MousePosition

Posted on 1997-12-29
1
116 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

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

Suggested Solutions

The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
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…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

707 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now