这是从俺正在写的一个查询平台中考出来的一段代码,
我都懒着动了.
procedure CQShowDsEntprsForm(AParent: TWinControl);
var
F: TCQDsEntprsForm;
I: Integer;
begin
for I := 0 to Screen.FormCount - 1 do
begin
if (not (Screen.Forms is TCQDsEntprsForm)) then Continue;
F := (Screen.Forms as TCQDsEntprsForm);
F.BringToFront;
Exit;
end;
CQCreateMDIChildForm(Application, TCQDsEntprsForm, AParent, 1);
end;