Click to See Complete Forum and Search --> : Ref. to treeview control
wolfofthenorth
May 30th, 2002, 11:27 PM
I think TreeView canbe found under System.Windows.Forms.Treeview
Try something like this...
Imports System.Windows.Forms
Public Function MyTreeFunction(ByVal tree As TreeView)
Or you can fully qualify it.
Public Function MyTreeFunction(ByVal tree As System.Windows.Forms.TreeView)
Hope this helps.
:)
BryanJ
May 31st, 2002, 12:41 PM
Unfortunately this does not work in a module as you can't reference System.Windows.forms in a module.
Cander
May 31st, 2002, 12:43 PM
change the to ByRef tree As System.Windows.Forms.Treeview
.net upgrade wizard sux!!
BryanJ
May 31st, 2002, 12:58 PM
Unfortunately I can't get a reference to the Windows.Forms namespace in a module.
So you cannot use...
Public Function MyFunction( byref tree as Window.Forms.Form.Treeview)
I would preferred to use a class but I seem to have the same problem. The class would povide high level functions to add nodes to trees and various other useful functions relating to treeviews.
Cander
May 31st, 2002, 01:03 PM
i said
System.Windows.Forms.Treeview
Windows.forms.Form.Treeview is incorrect.
BryanJ
May 31st, 2002, 01:11 PM
Sorry, Sorry , Sorry!!! but thanks.
The problem was that I am using a class library project and it does not automatically add the ref: Window.Forms.Form. After I added the reference manually it was possible to declare the function.
Thanks for your help, I really appreciate it.
Cander
May 31st, 2002, 01:12 PM
oh I see..ok cool..
wolfofthenorth
May 31st, 2002, 01:16 PM
Unfortunately this does not work in a module as you can't reference System.Windows.forms in a module.
I didn't have a problem getting to that namspace in a module. If you still can't get to it, maybe you don't have a reference you need. Although, I think it would be a sad day when the System namespace is unavailable. :(
wolfofthenorth
May 31st, 2002, 01:18 PM
Oops. I see you have already resolved the problem. Disregard last transmittion. :D
vbforums.com
Copyright Internet.com Inc., All Rights Reserved.