Hello, I know how to get the positions of the mouse over a TImage but my problem is this, When I drop a TImage onto a form and load a picture into it, set it's Align to alClient
and run the the program and move my mouse over the image the X and Y positions are correct.
If I set the TImage's Stretch to true and run the program the X and Y positions are correct again, not a problem...
However; if I (with the Stretch to true) enlarge the form (change it's size) the TImage changes it's size and is stretched or shrunk but the X and Y position's are no longer valid, the percentage X and Y are off is proportional to how bigger or smaller the image got.
It seems to do this because the TImage's Height and Width change but the number of pixels doesnt, because stretch is true. I need to get the correct position of the mouse's X and Y over the stretched pixels so the question is how do I compensate?
I'm sure someone has bumped into this problem before, anyway thanks in advance
-Richard
and run the the program and move my mouse over the image the X and Y positions are correct.
If I set the TImage's Stretch to true and run the program the X and Y positions are correct again, not a problem...
However; if I (with the Stretch to true) enlarge the form (change it's size) the TImage changes it's size and is stretched or shrunk but the X and Y position's are no longer valid, the percentage X and Y are off is proportional to how bigger or smaller the image got.
It seems to do this because the TImage's Height and Width change but the number of pixels doesnt, because stretch is true. I need to get the correct position of the mouse's X and Y over the stretched pixels so the question is how do I compensate?
I'm sure someone has bumped into this problem before, anyway thanks in advance
-Richard