|
-
Apr 1st, 2001, 01:45 AM
#1
Thread Starter
Lively Member
-
Apr 1st, 2001, 01:56 AM
#2
Lively Member
here u go -------->
Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hwnd As _
Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Any) As Long
Declare Function GetWindowLong Lib "user32" Alias "GetWindowLongA" (ByVal hwnd _
As Long, ByVal nIndex As Long) As Long
Declare Function SetWindowLong Lib "user32" Alias "SetWindowLongA" (ByVal hwnd _
As Long, ByVal nIndex As Long, ByVal dwNewLong As Long) As Long
Const GWL_STYLE = -16&
Const TVM_SETBKCOLOR = 4381&
Const TVS_HASLINES = 2&
Sub SetTreeViewBackColor(TV As TreeView, ByVal BackColor As Long)
Dim lStyle As Long
Dim TVNode As node
' set the BackColor for every node
For Each TVNode In TV.Nodes
TVNode.BackColor = BackColor
Next
' set the BackColor for the TreeView's window
SendMessage TV.hwnd, TVM_SETBKCOLOR, 0, ByVal BackColor
' get the current style
lStyle = GetWindowLong(TV.hwnd, GWL_STYLE)
' temporary hide lines
SetWindowLong TV.hwnd, GWL_STYLE, lStyle And (Not TVS_HASLINES)
' redraw lines
SetWindowLong TV.hwnd, GWL_STYLE, lStyle
End Sub
hope it helps....
capreal26
-
Apr 1st, 2001, 02:15 AM
#3
Thread Starter
Lively Member
-
Apr 1st, 2001, 05:50 AM
#4
New Member
Originally posted by sphynx
DAMN Microsoft can be gay..
Political correctness gone mad. Companies can now have a sexuality. Where will it end??
Mega Muffin will rise again
-
Apr 1st, 2001, 07:31 AM
#5
Thread Starter
Lively Member
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|