Localtion: Home»Directory»NET Framework

Yet another MDI Public....Private question

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

Comments