请大家给点实例学习一下,如Child的创建和关闭等,MDIForm的背景问题(我直接在窗体上加上Timage控件可是在TOOLBAR下面总有一段空白的没有能够TOP!

解决方案 »

  1.   

    Child_Form  你的字窗口名
    创建并显示:  if not Assigned(Child_Form) then
         Child_Form:=Child_Form.Create(Application);
      Child_Form.Show;关闭:
    在onClose事件中:
      action:=cafree;Destroy事件:
      Child_Form := nil;Timage 的Align 设为  alClient
      

  2.   

    不就是这个!  if not Assigned(Child_Form) then
         Child_Form:=Child_Form.Create(Application);
      Child_Form.Show;选判断是否创建,如查已创建则打开,如未创建则创建!
      

  3.   

    function TfrmMain.CreateChildForm(FormClass: TFormClass; Name: String): TForm;
    var ChildForm: TForm;
    begin
      ChildForm := TForm(Application.FindComponent(Name));
      if not (Assigned(ChildForm)) then
        ChildForm := FormClass.Create(Application)
      else
      begin
        ChildForm.WindowState := wsNormal;
        ChildForm.BringToFront;
      end;
      Result := ChildForm;
    end;