The picture box shows the image full size, but
without scrolling (as you no doubt know).
There is a really good example of how to do what you want
in the MSDN help thingy - MSDN Library visual studio 6.
I don't know if this is standard with VB6 or not...
If you have it, do a search in the help index for
"scrollable graphics viewport sample".
It's really too big to copy it all to here, plus I might
be breaching some sort of copyright law.
Anyway, to summarize, they use one picture box within
another picture box and a vertical and horizontal scroll bar. The inner picture box is set to Autosize.
When you click on the scroll bars, the inner picture box is
repositioned relative to the outer picture box.
like this:
Private Sub HScroll1_Change()
Picture2.Left = -HScroll1.Value
End Sub
Private Sub VScroll1_Change()
Picture2.Top = -VScroll1.Value
End Sub
I hope this helps.
If you have the help article, you are set.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.