README.md

December 5, 2022 ยท View on GitHub

Scroll a Form uing its own ScrollBars

Description

This simple example shows you how to use the FORMS very own scrollbars. No need to use pictureboxes and added horizontal and vertical scrollbars adjacent to it to allow display of a form larger than the screen. This could get quite messy. And yes, the Form does have its very own scrollbars. Take a look at the screen shot and also run the example.

A couple of APIs do most of the work for you

More Info

Most VB programmers do not realize the Form has scrollbars and consequently create elaborate methods for displaying forms that are larger than the physical screen. This example shows how to use the Forms scrollbars using a couple of simple API's.

Controls such as Lines and Shapes, or for that matter any control that does not have a hwnd, will need to be repainted when scrolled out of view and back in again. A simple way around this is to put those controls in pictureboxes with AutoRedraw = True.

Submitted On2002-04-14 16:39:02
ByJohn G
LevelAdvanced
User Rating5.0 (60 globes from 12 users)
CompatibilityVB 6.0
CategoryWindows API Call/ Explanation
WorldVisual Basic
Archive FileScroll_a_F719474142002.zip

API Declarations

Several. See the accompanying Module.