How to add Flat Scroll Bars to a ListView control (VB5) - requires version 4.71 of comctl32.dll or
How to add Flat Scroll Bars to a ListView control (VB5) - requires version 4.71 of comctl32.dll or later (IE4 or IE4.1)
API Declarations
Private Const LVM_SETEXTENDEDLISTVIEWSTYLE As Long = (LVM_FIRST + 54)
Private Const LVS_EX_FLATSB As Long = &H100
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 How to add Flat Scroll Bars to a ListView control (VB5) - requires version 4.71 of comctl32.dll or
(1(1 Vote))
It doesnt Have to be in Form_Load obviously
Private Sub Form_Load()
Dim lCount As Long
ListView1.ColumnHeaders.Add , , "Column 1"
ListView1.ColumnHeaders.Add , , "Column 2"
ListView1.View = lvwReport
Add some items to the listview
With ListView1.ListItems
For lCount = 1 To 25
.Add , , "Listview item number " & lCount
Next
End With
Set the Flat ScrollBar Style on the ListView
SendMessage ListView1.hwnd, LVM_SETEXTENDEDLISTVIEWSTYLE,LVS_EX_FLATSB, True
End Sub
Regards
Chris Eastwood
CodeGuru - the website for developers
http://www.codeguru.com/vb
How to add Flat Scroll Bars to a ListView control (VB5) - requires version 4.71 of comctl32.dll or Comments
No comments yet — be the first to post one!
Post a Comment