How to pan an image with the mouse
Posted on 2010-01-07
I have a TImage component on a form, where the image is larger than the form. The form's AutoScroll property is set to True. I can use the scroll bars to move the image around on the form, but I want to use the mouse. I want to click on the image and drag it to move it on the form. As I do this, the form's scroll bars should move correspondingly. I am going to set the image cursor to crHandPoint so that people will expect that they can move the image around.
My question is, how do I code this?