Control Focus with MDI Child Windows

  • Thread starter Thread starter solex
  • Start date Start date
S

solex

Hello,
I have noticed that when switch between MDI children the focus is changed
from the control with the focus when last deactivate to the control with the
TabOrder of 1. Is there an automatic way to ensure that the focus is
returned to the control that previously had the focus when switching between
MDI children?

Thanks,
Dan
 
solex said:
Hello,
I have noticed that when switch between MDI children the focus is
changed from the control with the focus when last deactivate to the
control with the TabOrder of 1. Is there an automatic way to ensure
that the focus is returned to the control that previously had the
focus when switching between MDI children?

I also read the same question from you two days ago, but I didn't and don't
have an explanation. I tried to reproduce the problem, but I couldn't. The
focus stays at the same control.

Could you please handle the Enter (or gotfocus) event of the control that
gets focused when switched back to the form? Set a breakpoint there and have
a look at the callstack. Expand the "not user code" (roughly translated from
German) by right-clicking in the callstack window and select "view not user
code". Then post the complete callstack here.
 
Armin,

Thank you for responding. I should also note that the mdi children are
identical and have 3 user controls that I have created (which may be part of
the problem). I will look at the call stack.

Thanks,
Dan
 
Back
Top