Posted on January 5, 2009
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
| 'Controls - How to set List View Text Background Color
Option Explicit
'Add a List View Control to your form.
Public Const LVM_FIRST As Long = &H1000
Public Const LVM_SETTEXTBKCOLOR As Long = (LVM_FIRST + 38)
Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, _
ByVal wParam As Long, ByVal lParam As Long) As Long
Private Sub Form_Load()
ListView1.ListItems.Add , , "CodeIt"
Call SendMessage(ListView1.hwnd, LVM_SETTEXTBKCOLOR, 0&, vbRed)
End Sub |