|
-
Feb 28th, 2003, 10:58 PM
#1
Thread Starter
Lively Member
VB - Adding Horizontal Scroll Bar to controls such as listbox
VB Code:
'Declaring the SendMessage API - To send a Message to other Windows
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
Const LB_SETHORIZONTALEXTENT = &H194 'Set the Horizontal Bar to 2 times its Width
Dim lngReturn As Long
Dim lngExtent As Long
lngExtent = 2 * (Form1.List1.Width / Screen.TwipsPerPixelX)
lngReturn = SendMessage(Form1.List1.hWnd, LB_SETHORIZONTALEXTENT, lngExtent, 0&)
Last edited by Bow-Viper1; Mar 1st, 2003 at 04:29 PM.
-
Mar 1st, 2003, 09:05 AM
#2
Hyperactive Member
Re: VB - Adding Horizontal Scroll Bar to controls such as listbox
Originally posted by Bow-Viper1
VB Code:
'Declaring the SendMessage API - To send a Message to other Windows
Public Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hWnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Any) As Long
Public Const LB_SETHORIZONTALEXTENT = &H194 'Set the Horizontal Bar to 2 times its Width
Dim lngReturn As Long
Dim lngExtent As Long lngExtent = 2 * (Form1.List1.Width / Screen.TwipsPerPixelX) lngReturn = SendMessage(Form1.List1.hWnd, LB_SETHORIZONTALEXTENT, _ lngExtent, 0&)
VB Code:
'Declaring the SendMessage API - To send a Message to other Windows
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
Const LB_SETHORIZONTALEXTENT = &H194 'Set the Horizontal Bar to 2 times its Width
Dim lngReturn As Long
Dim lngExtent As Long
lngExtent = 2 * (Form1.List1.Width / Screen.TwipsPerPixelX)
lngReturn = SendMessage(Form1.List1.hWnd, LB_SETHORIZONTALEXTENT, lngExtent, 0&)
-
Mar 1st, 2003, 04:28 PM
#3
Thread Starter
Lively Member
thanks, still getting used to these vbcode tags
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|