Hello,
Here's what I'd like to have in a form that I'm creating: A picture
box that contains an image that is significantly larger than the box.
I'd like for there to be scroll bars, but also to enable the user to
click and drag the image directly, with the scroll bars updating to
reflect which section of the image is shown on the screen.
I've created a panel and set it to AutoScroll, and put a PictureBox
into it. When the scroll bars are used, things work perfectly. When
I try to click and drag on the image (and update the Location of the
picture), the image moves as it should, but the scroll bars do not.
What happens is that the handles always stay in the same place, but
get wider or narrower as I change the .Location of the picture box.
Also, if I move the image to the upper left corner, the scroll bars
disappear completely, and if I move it to the bottom right, the scroll
bars have tiny scroll handles.
Any ideas of how to get this right?
Thanks,
Ben