Q. How do I scroll a picturebox?
A. There are several ways to accomplish what you
wish. The two most common are the following:
You can use the PictureBox.Print method to
update the picture box in response to the user
moving the scrollbar. This method is simple but
limited. It works well enough for scrolling text.
You can use a _pair_ of pictureboxes, the
second or "inner" of which is actually much larger
than the "outer" box which acts as a kind of window
for viewing part of the larger box.
This method is handy for displaying graphics that the
user will browse. If the inner picture box is large, a
lot of memory will be sacrified and the picture or text
may be slow to load. Again, your code will scroll the
inner box in response to the user moving the scrollbar.
If you have not used scrollbars before, take a look at
Scroll Bars in the on-line help. Pay attention to the
Scroll and Change events. You will use one of those for
your code.
(29-Jul-98 Bob Walsh rlwalsh@capecod.net