Programaticly shift the fucus from treeview to child form

F

feng

Hi,

I have a MDI container that contains a treeview and a
child form. Clicking on a tree node will open the child
form. Right now, the focus stays with the treeview, even
after the child form is loaded. When I want, however, is
that after a tree node is clicked, and a child form is
loaded, the focus should be shifted to the child form. How
to do that? I tried in the MDI container form to set focus
but it doesn't seem to work.

Please help!

Thanks
 
H

Herfried K. Wagner [MVP]

* "feng said:
I have a MDI container that contains a treeview and a
child form. Clicking on a tree node will open the child
form. Right now, the focus stays with the treeview, even
after the child form is loaded. When I want, however, is
that after a tree node is clicked, and a child form is
loaded, the focus should be shifted to the child form. How
to do that? I tried in the MDI container form to set focus
but it doesn't seem to work.

Did you try to call the child form's 'Activate' method?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top