通用窗口创建

//==============================================================================
// if mark=0 then Tform.show else Tform.showmodal
//==============================================================================

procedure OpenChildForm(FormClass:TFormClass;var Form:TForm;Mark:Integer=0);
begin
  if Mark=0 then
  begin
    if not Assigned(form) then Application.CreateForm(FormClass,Form);
    if Form.WindowState=wsminimized then Form.WindowState:=wsMaximized;
  end else begin
    form:=FormClass.Create(nil);
    Form.ShowModal;
    Form.Free;
  end;
end;

 
posted @ 2008-01-24 09:09  delphi中间件  阅读(171)  评论(0编辑  收藏  举报