在窗口间移动按扭

// 在窗口间移动按扭 
procedure TForm1.Button1Click(Sender: TObject);
begin
     if Button1.Parent=Form1 then
     begin
       button1.Caption:='单击返回';
       Button1.Parent:=Form2;
       Button1.Left := 232;
       Button1.Top := 88;
     end
     else
     begin
       button1.Caption:='单击移动';

       Button1.Parent:=Form1;
       Button1.Left := 242;
       Button1.Top := 111;
     end;
end;

//注意怎么同时出来2个窗体




posted @ 2012-05-26 08:14  XE2011  阅读(80)  评论(0编辑  收藏  举报