Scroll Bars on Images

Lanc1988

Contributor
Joined
Nov 27, 2003
Messages
508
I have an image that is to big to fit on the program, so I want to use the horizontal and vertical scroll bars to navigate around the image.

I have visual basic.net 2003 and I used the toolbox to place the image and the two scroll bars on the image. Now i just need the code for the scroll bars to actually work with the image.

Thanks.
 
  • Add a Panel to the form
  • Add a PictureBox to the Panel (drag-and-drop onto the Panel)
  • Load an image into the PictureBox
  • Set the location of the PictureBox to the coordinates (0, 0)
  • Set the AutoScroll property of the panel to true
 
It still won't scroll, the scrollbars go outside the panel, right? Or do you even add scrollbars?
 
Back
Top