Make your own free website on

Change Tree View BackGround Color

'Add 1 Tree View Control to your Form.
'Insert the following code to your form:

Private Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal _
hWnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Long) As Long
Private Const TVM_SETBKCOLOR = 4381&
Private Sub Form_Load()
'Replace the '255, 0, 0' below with the RGB value of the Tree View BackGround color.
Call SendMessage(TreeView1.hWnd, TVM_SETBKCOLOR, 0, ByVal RGB(255, 0, 0))
End Sub

Go Back