DotNet Visual Basic: Yet another MDI Public....Private question

  • meh / 206 / Fri, 27 Mar 2009 22:03:00 GMT / Comments (0)
  • Everytime I think I understand this it bites me......

    I have a derived tree control on a MDI parent form. From a child form I
    want to be able to add a node (or modify). The tree (CurrTree) has
    Public WithEvents CurrTree As TreeView

    defined in the parent (MDI) and the same tree(CurrTree) is also defined in a
    module as a
    Public CurrTree As TreeView

    I'm not sure if I really need to do this or not (part of my confusion)...

    In a child form when I try to access this treeview it is object reference
    not set to an instance of an object....
    I think I understand why I get this error (in the child the tree is not set
    to anything) but I guess I'm not getting the big picture of sharing objects
    between forms...

    So my question is

    1. Am I defining it (the tree) correctly to make it available everywhere in
    my app
    2. I know I have to set it to something when the child opens but what should
    I set it to??

    any help is greatly appreciated....

    tia
    meh

  • Keywords:

    mdi, public, .private, dotnet, visual basic, vb, .net

  • http://dotnet.itags.org/dotnet-visual-basic/174/«« Last Thread - Next Thread »»
  • DotNet Visual Basic Questions

    • Active Forms

      "Will" <Will@discussions.microsoft.com> wrote in messagenews:3A3C0EEC-A71C-4A30-B614-8B4FE4C17054...

      By andybecker

    • Active Forms

      * "=?Utf-8?B?V2lsbA==?=" <Will@discussions.microsoft.com> scripsit:> how do i get the names of a...

      By herfriedkwagnermvp

    • Active Forms

      Hey guys ..quick question, how do i get the names of all the active forms in my application ?THANX I...

      By will

    • Reading a network stream from a Telnet site

      I am trying to read text from a Telnet site melvyl.ucop.edu. I run thefollowing VB .NET 2003 code:Di...

      By greg

    • HTTP Requests And Response

      hiI've created an ASP.NET application which have certain HTML reports.Now I've got another requireme...

      By raheel_hussain, 6 Comments

    • active gantt

      hi,did anybody knows about this component.I've to realize a application with a gantt-chart, but dont...

      By renespreckelsen, 1 Comments

    • Reading a list of users from XP

      I am using VS 2005 (VB.NET) and I would like to get a list of all users whohave accounts on the serv...

      By samsmith, 4 Comments

    • active gantt

      hi,did anybody knows about this component.I've to realize a application with a gantt-chart, but ...

      By renespreckelsen, 1 Comments

    • KeyEventArgs

      can somebody help me please with this simple problem?I have combo box with numbers for months in it ...

      By dinobuljubasic, 4 Comments