Private Declare Function SendMessage Lib
As Long
Private Declare Function GetWindowLong Lib
Private Declare Function SetWindowLong Lib
dwNewLong As Long) As Long
Private Const GWL_STYLE =
Private Const TVM_SETBKCOLOR =
Private Const TVM_GETBKCOLOR =
Private Const TVS_HASLINES =
Dim frmlastForm As Form
Private Sub Form_Load()
Dim nodX As Node
Set nodX = TreeView
Set nodX = TreeView
Set nodX = TreeView
Set nodX = TreeView
Set nodX = TreeView
nodX
TreeView
TreeView
End Sub
Private Sub Command
Dim lngStyle As Long
Call SendMessage(TreeView
lngStyle = GetWindowLong(TreeView
Call SetWindowLong(TreeView
Call SetWindowLong(TreeView
End Sub
Option Explicit
Private Declare Function SendMessage Lib
Private Declare Function GetWindowLong Lib
Private Declare Function SetWindowLong Lib
Private Const GWL_STYLE =
Private Const TVM_SETBKCOLOR =
Private Const TVM_GETBKCOLOR =
Private Const TVS_HASLINES =
Private Sub Form_Load()
Dim nodex As Node
Dim i As Integer
Dim lStyle As Long
Call SendMessage(TreeView
lStyle = GetWindowLong(TreeView
Call SetWindowLong(TreeView
Call SetWindowLong(TreeView
TreeView
TreeView
With TreeView
Set nodex =
nodex
For i =
Set nodex =
nodex
nodex
Next
End With
End Sub
From:http://tw.wingwit.com/Article/program/net/201311/12961.html