我想在一个子窗口中再生成一个子窗口,以第一个子窗口为父窗口的子窗口,怎么实现.
谢谢,问了n多人都不知道,告诉我一下.

解决方案 »

  1.   

    我是这样做的,先建立三个窗口,1,2,3,然后分别在它们的create事件里面写下面的代码
    1:procedure TForm1.FormCreate(Sender: TObject);
    begin
      if Form2 = nil then
         Form2 := TForm2.Create(Application);
      Form2.Show;
      if Form3 = nil then
         Form3 := TForm3.Create(Application);
      Form3.Show;   
    end;2:   Windows.SetParent(Self.Handle,Form1.Handle);
    3:      Windows.SetParent(Self.Handle,Form2.Handle);
      

  2.   

    if Form2 = nil then
         Form2 := TForm2.Create(Application);
      Form2.parent:=Form1;
      Form2.Show;
      if Form3 = nil then
         Form3 := TForm3.Create(Application);
      Form3.Parent:=Form2;
      Form3.Show;