CodeItBetter Programming Another VB Programming Blog

How to set List View Text Background Color

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
Filed under: Controls Leave a comment
Comments (0) Trackbacks (0)

No comments yet.


Leave a comment


 

No trackbacks yet.