var
  f1:Tform;
begin
  f1:=Tform.Create(self);
  f1.Show;
end;
就可以了

解决方案 »

  1.   

    如果form1已经存在了,下面的就可以了。
      if Form1=nil then
      begin
        Application.CreateForm(Tform1,Form1);
        Form1.Show;
      end;
      

  2.   


    我现在没有窗体名(companent)
    只有窗体名(string)而且我的窗体不是自动创建的
      

  3.   

    我现在没有窗体名(companent)
    只有窗体名(string)???你想实现什么功能。
      

  4.   

    比如说:有个EDIT1框,有个Button1
             功能:输入Edit1 ='f_frm'时
                  我一点Button1  就打开了 名字为f_frm的窗体
                 当输入EDit2 ='f_frm2'
                  我一点Button1  就打开了 名字为f_frm2的窗体
    请问:这个Button1的代码怎么写?(注我的窗体都不是自动创建)前提:我想打开的窗体是已经存在的。我写的很难理解吗????
      

  5.   

    tform =new tform(self);
    from.show();
      

  6.   


    是不是这样?
     
    for i:=0 to Screen.Formcount-1 do
        if Screen.Forms[i].caption=trim(Edit1.Text) then
          begin
           with Screen.Forms[i] do
            begin
              Parent:= mainpanel;
              Align:=alClient;
              WindowState:= wsMaximized;
              Show;
              captionLabel.Caption:=caption;
            end;
            break;
         end;
      

  7.   

    for i:=0 to Screen.Formcount-1 do
        if Screen.Forms[i].caption=trim(Edit1.Text) then
          begin
           Screen.Forms[i].Show;
           break;
          end;