诛仙3怪物颜色:怎样让子窗体的位置在最前

来源:百度文库 编辑:高校问答 时间:2024/05/08 18:55:24
用菜单呼出几个子窗体后,各子窗体是叠加的,再点菜单上这个功能,没反应,怎样让本来在下面的子窗体提到上面来
源程序如下
procedure TFo_main.N14Click(Sender: TObject);
var fo_rep:Tfo_rep;
begin
if IsExistWindow(Tfo_rep) then
begin
exit;
end;
fo_rep:=Tfo_rep.Create(self);
fo_rep.Show;
end;

function TFo_main.IsExistWindow(FormClass: TComponentClass):Boolean;
var iIndex: Integer;
begin
Result := False;
for iIndex := 0 to MDIChildCount do begin
if MDIChildren[iIndex] is FormClass then begin
Result := True;
Exit;
end;
end;
end;