|
-
Dec 3rd, 2000, 03:29 PM
#1
Can anybody take a look on this code and tell me
what's wrong with it....please
'API Call for Sending the message
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 GWL_STYLE = -16&
Private Const TVM_SETBKCOLOR = 4381&
Private Const TVM_GETBKCOLOR = 4383&
Private Const TVS_HASLINES = 2&
Private Const TV_FIRST As Long = &H1100
Private Const TVM_GETTEXTCOLOR As Long = (TV_FIRST + 32)
Private Const TVM_SETTEXTCOLOR As Long = (TV_FIRST + 30)
Private Sub Form_Load()
Dim mNode As Node
Dim i As Integer
'Populate the list box
'Add the primary node
Set mNode = TreeView1.Nodes.Add(, , "Abuelo", "abuelo")
Set mNode = TreeView1.Nodes.Add("Abuelo", tvwChild, "Papa", "papa")
Set mNode = TreeView1.Nodes.Add("Papa", tvwChild, "Nieto1", "nieto1")
Set mNode = TreeView1.Nodes.Add("Papa", tvwChild, "Nieto2", "nieto2")
Set mNode = TreeView1.Nodes.Add("Nieto1", tvwChild, "Bisnieto", "bisnieto1")
For Each mNode In TreeView1.Nodes
mNode.BackColor = RGB(255, 204, 0) 'blau fosc
Next
Call SendMessage(TreeView1.hWnd, TVM_SETBKCOLOR, 0, ByVal RGB(255, 204, 0))
Call SendMessage(TreeView1.hWnd, TVM_SETTEXTCOLOR, 0, ByVal RGB(0, 127, 0))
End Sub
Private Sub TreeView1_Click()
TreeView1.Refresh
End Sub
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
|