在打开dpr文件后,为什么有的时候出现的是主窗体而有的时候出现的是program 开头的窗体?怎么设置的?因为我想在打开的dpr文件中设置窗体的新建!即  Application.CreateForm(TDataModule1, DataModule1);之类的东西!
   

解决方案 »

  1.   

    你可以通過 project--view source 看到你想要的代碼行。
      

  2.   

    打开跟你保存的项目名称相同的那个.cpp文件就可以看到了.
      

  3.   

    program是你工程程序执行的入口,是系统为你自动创建的。
    当然你也可以修改他。exe文件就是根据这段代码生成的。
    楼上的方法可以看到这段代码!
    下面是Delphi帮助的说明:
    A program containsa program heading,
    a uses clause (optional), and
    a block of declarations and statements.The program heading specifies a name for the program. The uses clause lists units used by the program. The block contains declarations and statements that are executed when the program runs. The IDE expects to find these three elements in a single project (.dpr) file.The following example shows the project file for a program called Editor. 1     program Editor;
     2
     3     uses
     4       QForms, {cross-platform Form}
     5       REAbout in 'REAbout.pas' {AboutBox},
     6       REMain in 'REMain.pas' {MainForm};
     7
     8     {$R *.res}
     9
    10     begin
    11       Application.Title := 'Text Editor';
    12       Application.CreateForm(TMainForm, MainForm);
    13       Application.Run;14     end.Line 1 contains the program heading. The uses clause is on lines 3 through 6. Line 8 is a compiler directive that links the project's resource file into the program. Lines 10 through 14 contain the block of statements that are executed when the program runs. Finally, the project file, like all source files, ends with a period.This is, in fact, a fairly typical project file. Project files are usually short, since most of a program's logic resides in its unit files. Project files are generated and maintained automatically, and it is seldom necessary to edit them manually.