PDA

Click to See Complete Forum and Search --> : Removing Scroll Bar from List Box


*Super Sniper*
Feb 7th, 2001, 09:12 PM
I have 2 listboxes that are linked, I need to remove the scroll bar from one of them (more items then the list box can show). I can't make the listboxes bigger. So my only option is to remove the scroll bar.

Feb 7th, 2001, 10:26 PM
Use the ShowScrollBar API function.



Private Declare Function ShowScrollBar Lib "user32" _
(ByVal hwnd As Long, ByVal wBar As Long, _
ByVal bShow As Long) As Long

Private Const SB_BOTH = 3
Private Const SB_HORZ = 0
Private Const SB_VERT = 1


Private Sub Command1_Click()
ShowScrollBar List1.hwnd, 3, False
End Sub