open a new "Form" from a "TreeView"?

mohamosh

New member
Joined
Jun 7, 2021
Messages
1
Programming Experience
Beginner
Dear all,

I am really new in C#. I want to open a new "From" by clicking on a "Node in a Treeview".

Is there anybody who could kindly help me?

Best wishes
 
This is a classic case of a beginner treating multiple problems as though they are one. How do you usually open a form? That's exactly how you open this form. When/where you want to do it has no effect on how you do it. The code to open a form is the same regardless.

As for the rest, if you've worked your way through a beginner tutorial - if you haven't, why not - then you already know that "do X when Y" means handle the appropriate event and put the code to do X in the event handler. That's the case if you want to do X when the form loads, when a button is clicked, when the text in a textbox changes or whatever. That means that all you have to do is find out what events the TeeView control has and which one is raised when you click a node.

You may be a beginner at programming but you still have all the other knowledge you have accrued over your lifetime, so you have some problem-solving ability and you should apply that to programming problems. The very first step in solving any problem is to break it down into smaller parts and address each part individually, combining the partial solutions into a single solution for the original problem. That's something that you need to learn and apply fairly quickly in programming.
 
Back
Top Bottom