HOLA!!!
Como lo dice el titulo, agrega un scrollbar horizontal al ListBox, yo la usaria con Call, pero le puse para que devolviera false en el caso que no resultara.
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
Private Function HListScroll7913Add(ListX As ListBox) As Boolean
On Error GoTo Err:
Dim X As Long
Dim new_len As Long
Dim max_len As Long
HListScrollAdd7913 = True
For X = 0 To ListX.ListCount - 1
new_len = 10 + ScaleX(TextWidth(ListX.List(X)), ScaleMode, vbPixels)
If max_len < new_len Then max_len = new_len
Next
SendMessage ListX.hwnd, &H194, max_len, 0
Err:
HListScrollAdd7913 = False
End Function
GRACIAS POR LEER!!!
es igual que esto:
Agregar ScrollBar horizontal a un ListBox (http://www.recursosvisualbasic.com.ar/htm/listado-api/182-scrollbar-horizontal-en-listbox.htm)
yo igual declararia la constante que le estas pasando ahi que es "&H194", que corresponde a:
Private Const LB_SETHORIZONTALEXTENT = &H194
porque sino no se sabe que es ese valor....
otra forma es esta:
Private Declare Function ShowScrollBar Lib "user32" (ByVal hwnd As Long, ByVal wBar As Long, ByVal bShow As Long) As Long
Private Const SB_HORZ = 0
Private Const SB_VERT = 1
Private Const SB_BOTH = 3
Private Sub Form_Load()
ShowScrollBar List1.hwnd, SB_HORZ, True
End Sub
saludos.