VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



add a horizontal scroll bar to a listbox or combo

by VB Qaid (3 Submissions)
Category: Complete Applications
Compatability: Visual Basic 3.0
Difficulty: Unknown Difficulty
Date Added: Wed 3rd February 2021
Rating: (4 Votes)

add a horizontal scroll bar to a listbox or combo box

API Declarations
#If Win16 Then
Declare Function SendMessage Lib "User" (ByVal hwnd As Integer, ByVal wMsg As Integer, ByVal wParam As Integer, lParam As Any) As Long
#Else
Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Any) As Long
#End If

Rate add a horizontal scroll bar to a listbox or combo

Const WM_USER = 1024
Const LB_SETHORIZONTALEXTENT = (WM_USER + 21)
Dim nRet As Long
Dim nNewWidth As Integer
nNewWidth = list1.Width + 100 'new width in pixels
nRet = SendMessage(list1.hwnd, LB_SETHORIZONTALEXTENT, nNewWidth, ByVal 0&)

Download this snippet    Add to My Saved Code

add a horizontal scroll bar to a listbox or combo Comments

No comments have been posted about add a horizontal scroll bar to a listbox or combo. Why not be the first to post a comment about add a horizontal scroll bar to a listbox or combo.

Post your comment

Subject:
Message:
0/1000 characters