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

  • Thread starter Thread starter Dean Slindee
  • Start date Start date
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
 
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)
 
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
 
Back
Top