Application.CreateForm(Tfrm_about,frm_about);应该怎么理解?Application.CreateForm这是一个标准的什么吗?怎么才能查到类似的东东(不知道该怎么称呼 :( )呢?参数是怎么样的规则啊?

解决方案 »

  1.   

    Creates a new form.Delphi syntax:procedure CreateForm(FormClass: TFormClass; var Reference);C++ syntax:void __fastcall CreateForm(System::TMetaClass* InstanceClass, void *Reference);
      

  2.   

    DescriptionCall CreateForm to dynamically create a form at runtime. Developers do not need to add code for creating most forms, because typically one or more calls to CreateForm are added automatically to the project's main source when using the form designer.CreateForm creates a new form of the type specified by the FormClass parameter and assigns it to the variable given by the Reference parameter. The owner of the new form is the Application object. Note: By default, the form created by the first call to CreateForm in a project becomes the application抯 main form.
      

  3.   

    Application.CreateForm(Tfrm_about,frm_about);其实就实现以下功能:frm_about:=Tfrm_about.Create(Application);其实你完全可以去掉Application.CreateForm(Tfrm_about,frm_about);
    写成
      with  Tfrm_about.Create(Nil) do
      begin
         ShowModal();
         free();
      end;