Scrolling View Port Demo
Version Compatibility: Visual Basic 6, Visual Basic 5
For the demo to work, do the following
- Start a new project.
- On Form1 put a VScrollBar and a PictureBox
- Inside of the PictureBox put a second PictureBox.
- Don't worry about sizing them. That will be taken care of in code.
- Put a command button inside Picture2.
- Copy the code below into Form1 declarations section. It will become the Form1_Resize() event and the Vscroll1_Cahnge() event.
- Press F5 to run the program. When you scroll the scroll bar the command button should scroll out of site.
Instructions: Copy the declarations and code below and paste directly into your VB project.