By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
460,045 Members | 1,339 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 460,045 IT Pros & Developers. It's quick & easy.

Programaticly shift the fucus from treeview to child form

P: n/a
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
Nov 20 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
* "feng" <an*******@discussions.microsoft.com> scripsit:
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?

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>
Nov 20 '05 #2

P: n/a
I just tried that. It doesn't seem to make any
difference...
-----Original Message-----
* "feng" <an*******@discussions.microsoft.com> scripsit:
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?

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>
.

Nov 20 '05 #3

P: n/a
* "feng" <an*******@discussions.microsoft.com> scripsit:
I just tried that. It doesn't seem to make any
difference...


Mhm...

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>
Nov 20 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.