.NET Scroll Bar Control

Category:
C#, VB.NET, ASP.NET
Type:
Controls
Difficulty:
Advanced
Author:
Nathan Moschkin

Version Compatibility: Visual Basic.NET

More information:
This is a .NET class module that is designed to interface with the windows API and takes a System.Windows.Forms.Control.Handle as a window handle. When the class is attached to the window you can enable and disable scrollbars at your convenience.

There are a number of events that will fire automatically, but they require a hookup. In your module, override the WndProc() function, if you receive WM_HSCROLL and WM_VSCROLL messages, pass these messages to the clsScroll.HandleEvent() procedure. The Class will then fire an event based on what it has received.

Definitions for WM_HSCROLL and WM_VSCROLL messages are included in the file modAPI which contains a number of constants and methods required by this class module.


Instructions: Click the link below to download the code. Select 'Save' from the IE popup dialog. Once downloaded, open the .zip file from your local drive using WinZip or a comparable program to view the contents.

Download scroll_example.zip