click on different resolution

Posted on 2012-09-13
Last Modified: 2012-09-13
how can I click a coordinate in different resolutions?
example I have coordinated 800x600 want more picks coordinated in 1024x800 resolution?
Question by:skiuia
    LVL 25

    Accepted Solution

    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


    Author Comment

    [DCC Error] Unit1.pas(38): E2010 Incompatible types: 'tagSIZE' and 'TPoint'
    LVL 25

    Expert Comment

    by:Sinisa Vuk
    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


    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How your wiki can always stay up-to-date

    Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
    - Increase transparency
    - Onboard new hires faster
    - Access from mobile/offline

    Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
    In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
    Need more eyes on your posted question? Go ahead and follow the quick steps in this video to learn how to Request Attention to your question. *Log into your Experts Exchange account *Find the question you want to Request Attention for *Go to the e…
    Here's a very brief overview of the methods PRTG Network Monitor ( offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

    737 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

    22 Experts available now in Live!

    Get 1:1 Help Now