基于Windows API函数,实现了一个类模块,可增强VB中的滚动条控件,使滚动条控件的值范围扩大到长整数表示的范围,并可解决其白色背景问题。该程序封装了与滚动条相关的常见功能,并具有很强的通用性,可用于任何工程。其接口也十分简单,主调程序只需用简单的几行代码即可调用。介绍了该类模块的设计、主要实现技术和调用接口等。该类模块功能强大,使用方便灵活,可以成为VB程序设计中的得力助手。
A class module is developed to enhance the scroll bar controls in VB language. The value property of an enhanced scroll bar is set within the range of a long integer and the unsightly white background is changed to bright grey. The class encloses most common functions of a scroll bar control and is used in any VB project, having simple interface with ease of use. There are only several statements required in main program. The design, technique and interface of the class are discussed. It may become a valuable tool for VB programmers in their future work.