By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,264 Members | 1,079 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,264 IT Pros & Developers. It's quick & easy.

problem with treeview and its reference in vb6

P: 84
hi

i have a strange problem with my treeview i currently have in my pogram (in vb6) a week ago i placed a treeview on my form and did all the code for it etc and got it to work fine, i even made an .exe and sent it to a friend so he could have a look @ how my program was coming along and that worked fine (and still does on mine and his)

now (last night) i tried to run my program and i got a user-defined error on the line (in bold)
Expand|Select|Wrap|Line Numbers
  1.  
  2. Private Sub TreeView1_NodeClick(ByVal Node As MSComctlLib.Node)
  3. If TreeView1.SelectedItem.Text = "Ores" Then
  4. Txt_ItemName.Text = ""
  5. ElseIf TreeView1.SelectedItem.Text = "Minerals" Then
  6. Txt_ItemName.Text = ""
  7. Else
  8. If TreeView1.SelectedItem.Parent.Text = "Ores" Then
  9. Txt_ItemName.Text = ""
  10. Else
  11. Txt_ItemName.Text = TreeView1.SelectedItem.Text
  12. End If
  13. End If
  14. End Sub
  15.  
the treeview component doesnt appear on the left hand side and i searched for it in referneces and cant find it.

i think the treeview reference is comctl32.ocx or .dll
i have both of them in my system and system32 folder and tried to reference it , it either just freezes or it comes back with and error.

also where the treeview was it has now been switched with a pic box.

can anyone cast there wisdom on this ? and give tell me the name of the reference that i need
Jun 28 '08 #1
Share this Question
Share on Google+
2 Replies


debasisdas
Expert 5K+
P: 8,127
it might happen the component is corrupted.

1.copy the file from some other system ,
2.store in the system32 folder
3.register with windows using REGSVR32 key

then try to use it again.
Jun 30 '08 #2

P: 84
it might happen the component is corrupted.

1.copy the file from some other system ,
2.store in the system32 folder
3.register with windows using REGSVR32 key

then try to use it again.
nvm i fixed it (wasnt the above)
Jul 1 '08 #3

Post your reply

Sign in to post your reply or Sign up for a free account.