VBcoders Browse New Submit Contact Sign In

No account? Register free

Forgot password?

XP Style Scroll Control

archetech  (1 Submission)   Custom Controls/Forms/Menus   Intermediate   Wed 3rd February 2021

Sick of those ugly VB 6 scroll bars that don't support XP themes? Don't feel like messing with a manifest? Here is the code for you. This scrollbar control acts just like the XP scroll bar on a multi-line text box because it is. The control just uses an API call and a timer to expose the scroll event of the textbox and then hides the textbox. This means you get allot of functionality with very little code. There is room for improvement and additions, but I wanted to keep the code as simple as I could.

Side Effects
Leave a little width on the control instance in the designer so you can drag and resize it. The designer does not seem to detect click events on the textbox scrollbar.

API Declarations
Private Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Any) As Long

Rate XP Style Scroll Control (7(7 Vote))

Download XP Style Scroll Control

XP Style Scroll Control Comments

No comments yet — be the first to post one!

Post a Comment

0/1000 characters