click on different resolution

how can I click a coordinate in different resolutions?
example I have coordinated 800x600 want more picks coordinated in 1024x800 resolution?
Who is Participating?
Sinisa VukConnect With a Mentor Commented:
Something like this....
function GetScaledViewPoint(MousePt: TPoint; rScreenSizeOrg, rScreenSizeDest: TSize): TPoint;
  Result.X := MulDiv(MousePt.X,,;
  Result.Y := MulDiv(MousePt.Y,,;

pt := GetScaledViewPoint(Types.Point(14,356), Types.Point(800,600), Types.Point(1024,800));

Open in new window

skiuiaAuthor Commented:
[DCC Error] Unit1.pas(38): E2010 Incompatible types: 'tagSIZE' and 'TPoint'
Sinisa VukCommented:
Sorry this is just example of calling in one line. You can use variables of Tsize type or use typecast.

pt := GetScaledViewPoint(Types.Point(14,356), TSize(Types.Point(800,600)), TSize(Types.Point(1024,800)));

Open in new window

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.