如题!

解决方案 »

  1.   

    with Tform2.create(panel1) do
      begin
        parent:=panel1; 
        Align:=alClient;
        show;
      
      end;
      

  2.   

    Form2 := TForm2.Create(self);
      with Form2 do
      begin
        Parent := Panel1;
        Visible := True;
        Top := Panel1.Top;
        Left := Panel1.Left;
        Width := Panel1.Width;
      end;
      

  3.   

    procedure TForm1.Button1Click(Sender: TObject);
    var
     temp:TForm1;
    begin
     temp:=TForm1.Create(self);
     temp.Parent:=form1.Panel1;
     temp.Show;
     temp.Color:=clred;
    end;
      

  4.   

    esu(ESU) 的好啊!:)
    Align:=alClient;
      

  5.   

    form2.Parent := TWinControl(form1.Panel);
    form2.show;
    不知道可以不可以。
      

  6.   

    Form2 := TForm2.Create(self);
      with Form2 do
      begin
        Parent := Panel1;
        Visible := True;
        Top := Panel1.Top;
        Left := Panel1.Left;
        Width := Panel1.Width;
      end;
      

  7.   

    还有一个问题,就是怎么判断form2已创建了呢?
    我是的:
      form2:=Tform2.create(self);
      form2.show;
    要怎么来写
    谢谢
      

  8.   

    var
      AHandle:THandle;
    begin
      AHandle:=FindWindow(form2,nil);
      if AHandle=0 then
      begin
         ...
      end;
    end;
      

  9.   

    if not assigned(form2) then application.createform(Tform2,form2);
      form2.show;
      

  10.   

    if form2=nil then
    begin
    form2:=tfrom2.create(self);
    form2.show;
    end;
      

  11.   

    if form2=nil then
    begin
    form2:=tfrom2.create(self);
    form2.show;
    end;
      

  12.   

    有没有搞错!
     seawavefj(@_@) 完全是抄我的,还给他16分!!!!