Results 1 to 3 of 3

Thread: [2005] Treeview

  1. #1

    Thread Starter
    New Member
    Join Date
    Apr 2008
    Posts
    3

    Exclamation [2005] Treeview

    Hello, plss help me.

    I started a project, an explorer aplication. I use a form and two classes for the treeview and listview objects. The listview class works ok, but the treeview class has a bug. At startup i declared it to fill with the contents of the computer, but I cannot access those folders.
    My treeview class is called "DirectoryTreeView"
    When I wanna acces it I call the variable: "Private dtvwDirectory As DirectoryTreeView" but all the time I get an error like this "Object reference not set to an instance of an object." If I use "Private dtvwDirectory As New DirectoryTreeView", the new class will be empty.
    Ideeas?

    Do you know any explorer projects?
    Thx

  2. #2
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: [2005] Treeview

    You don't create a new instance at all. If you've added this tree view to your form then the object already exists and you've already got a member variable that refers to it. Unless you changed the name when you added it to the form you would access it via Me.DirectoryTreeView1.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  3. #3

    Thread Starter
    New Member
    Join Date
    Apr 2008
    Posts
    3

    Re: [2005] Treeview

    thanks friend, you really helped me... I was so confused with that piece of code.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width