title: not able to create a dynamic form in Delphi 7
body: <p>I have put together this code for creating a dynamic form</p>
  
  <pre><code>unit Unit1;
  
   interface
  
   uses
      Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
      Dialogs, StdCtrls;
  
    type
      TForm1 = class(TForm)
     Button1: TButton;
     procedure Button1Click(Sender: TObject);
    private
     { Private declarations }
    public
     { Public declarations }
    end;
  
  
    type
      TForm2 = class(TForm)
       private
         { Private declarations }
      public
        { Public declarations }
      end;
  
    var
      Form2: TForm2;
      Form1: TForm1;
  
  implementation
  
    {$R *.dfm}
  
    procedure TForm1.Button1Click(Sender: TObject);
   var
       a:TForm2;
   begin
       a:=TForm2.Create(nil);
     end;
  </code></pre>
  
  <p>end.</p>
  
  <p>I get an error saying resource tform2 cannot be found. What must i do?</p>
  
  <p>Thanks</p>