VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



XP Style Scroll Control

by archetech (1 Submission)
Category: Custom Controls/Forms/Menus
Difficulty: Intermediate
Date Added: Wed 3rd February 2021
Rating: (6 Votes)

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

Download XP Style Scroll Control

Download XP Style Scroll Control (4 KB)

XP Style Scroll Control Comments

No comments have been posted about XP Style Scroll Control. Why not be the first to post a comment about XP Style Scroll Control.

Post your comment

Subject:
Message:
0/1000 characters