Solved

OnClick event

Posted on 1998-10-19
1
395 Views
Last Modified: 2010-04-06
If using OnMouseDown event we know the position of mouse.
How if using OnClick event ?

Regards,
Joely
0
Comment
Question by:joely
1 Comment
 
LVL 27

Accepted Solution

by:
kretzschmar earned 10 total points
ID: 1343324
hi joely,

try this

procedure TForm1.Button1Click(Sender: TObject);
var P : TPoint;
begin
  GetCursorPos(P);
  { Physically Position }
  edit1.text := inttoStr(p.x);
  edit2.text := inttoStr(p.y);
  { relativ Position to Container (i.e. Form) Client Area }}
  edit3.text := inttoStr(Screentoclient(P).x);
  edit4.text := inttoStr(Screentoclient(P).y);
end;

meikl
0

Featured Post

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Delphi Form ownership 4 125
SUM 2 INTEGER ARRAYS INTO 1 10 111
How to Get Images From Server using App Tethering 11 42
Can Live bindings change TGrid Cell Colour ? 1 30
A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

756 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