How to determine which Form has focus in Parent-->Children forms


D

Dean Slindee

I have a main form which has multiple child forms painted within tab pages
on the main form. From a menu item on the main form, I would like to
determine which of the child forms is the one the user is viewing. Is there
a way to do this with parent/child forms? This is not MDI.

First two attempts do not satisfy the question:
Form.Active refers to the main form.
..Focused property is False for the child form being viewed; works on
controls, not forms.

Thanks in advance.
Dean Slindee
 
Ad

Advertisements

J

Jack Jackson

I have a main form which has multiple child forms painted within tab pages
on the main form. From a menu item on the main form, I would like to
determine which of the child forms is the one the user is viewing. Is there
a way to do this with parent/child forms? This is not MDI.

First two attempts do not satisfy the question:
Form.Active refers to the main form.
.Focused property is False for the child form being viewed; works on
controls, not forms.

Thanks in advance.
Dean Slindee

If each form is on a tab page, why don't you check which tab page is
selected? (TabControl.SelectedIndex or SelectedPage)
 
Ad

Advertisements

C

Cor Ligthert[MVP]

Dean,

Can you show us how you did that painting of a form on a tabpage, then we
maybe know an answer.

At least I have never seen this doing.

Cor
 

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