I have a TreeView WinForms control that I would like to use to open another form based on which node is currently selected. I want to open this other form when I Ctrl + Click on node.
Currently, it works as we would like if I open another form in the DoubleClick handler (and double-click on the node, obviously); however, if I use the Click handler (or MouseClick) and open another form when I press the control key, it correctly opens another form, but returns focus to the original form.
How to keep focus from returning to the original form (I still want to keep it) after opening another form? Why is there a different behavior between Click and DoubleClick handlers?
Kevin carroll
source
share