Board index » delphi » Give a MDI-child focus

Give a MDI-child focus

Hi Delpixers,

Situation:

3 MDI Child Windows are activate: A, B and C

The user activates B.
The user activates C.
The user closes C.

Problem:

B gets the focus.

Question:

How can I give A the focus, instead of B??????

Thanx in advance,
for your help,

Eddy Hendriks

 

Re:Give a MDI-child focus


Quote
>  How can I give A the focus, instead of B??????

I'm not sure but I use things like
for i := 0 to mdichildcount - 1 do
  begin
    MDIchildren[i]  //do this and that
  end;
to loop through all MDIchildren.
If A is the first child it will have number 0
So maybe you could use MDIchildren[0].show or something.
I am guessing here.

johan

Other Threads