Tom,
I still think you are approaching this from "the whole thing."
You need to begin with each small step:
Recreate the main form
Add the minimal amount of Code to open and close that form without a hitch.
Gradually add controls to your form
Add code for the controls
Add the TreeView control
Gradually add parts of the code to add functionality to the TreeView control
etc.
I still think this is a referencing problem. Either the control is not declared, set or referenced properly.
Again, in two minutes, I created a form with a TreeView control, dimmed a TreeView, set that object to the control, and was able to access all properties. Everything is there. I think you're just biting off more than you can chew at one time.
One step at a time--not many of us here have the time to work through "the whole thing." We are trying to point you toward where to focus your troubleshooting .
The nature of the error has to do with proper referencing. The code does not understand that the object is a TreeView control. It's that simple. That's the answer. You need to find out why it is not declared that way. I think there may be a module somewhere that is declaring it and setting it so publicly, but the code provided doesn't mention it anywhere. Once that public bit is uncovered, you will find success.
I still think you are approaching this from "the whole thing."
You need to begin with each small step:
Recreate the main form
Add the minimal amount of Code to open and close that form without a hitch.
Gradually add controls to your form
Add code for the controls
Add the TreeView control
Gradually add parts of the code to add functionality to the TreeView control
etc.
I still think this is a referencing problem. Either the control is not declared, set or referenced properly.
Again, in two minutes, I created a form with a TreeView control, dimmed a TreeView, set that object to the control, and was able to access all properties. Everything is there. I think you're just biting off more than you can chew at one time.
One step at a time--not many of us here have the time to work through "the whole thing." We are trying to point you toward where to focus your troubleshooting .
The nature of the error has to do with proper referencing. The code does not understand that the object is a TreeView control. It's that simple. That's the answer. You need to find out why it is not declared that way. I think there may be a module somewhere that is declaring it and setting it so publicly, but the code provided doesn't mention it anywhere. Once that public bit is uncovered, you will find success.
Comment