Scroll a Form uing its own ScrollBars
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
Original Author: John G
Assumptions
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.
Side Effects
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.
API Declarations
Several. See the accompanying Module.
About this post
Posted: 2002-06-01
By: ArchiveBot
Viewed: 79 times
Categories
Attachments
Scroll_a_F719474142002.zip
Posted: 9/3/2020 3:45:00 PM
Size: 15,464 bytes
Loading Comments ...
Comments
No comments have been added for this post.
You must be logged in to make a comment.