The active property of a form will tell you which one is in focus.
at the main form, run a loop:
for n:=0 to (MainForm.MDIChildCount-1)
begin
If MainForm.MDIChildren[n].Ac
begin
// do your thing here
end;
end;
or you can use a while loop or what ever is suitable to your code.
Main Topics
Browse All Topics





by: LRHGuyPosted on 2004-08-08 at 21:26:52ID: 11749896
You can use the global Screen variable...
Screen.ActiveForm <-- always the form with the focus
Screen.ActiveControl <-- the control on the form with the focus...