我就是学习呀.  能用notepad打开,但是我想用delphi来编辑的

解决方案 »

  1.   

    project菜单 view source
      

  2.   

      view source 
    01: program Project1;
    02: 
    03: uses
    04:   Forms,
    05:   Unit1 in `Unit1.pas' {Form1};
    06:
    07: {$R *.RES}
    08:
    09: begin
    10:   Application.Initialize;
    11:   Application.CreateForm(TForm1, Form1);
    12:   Application.Run;
    13: end.
    On line 1, the program keyword identifies this unit as a program's main source unit. You can see that the unit name, Project1, follows the program keyword (Delphi gives the project a default name until you save the project with a more meaningful name). Beginning on line 3, you see a section identified by the uses keyword. Any unit names following the uses keyword, up to the semicolon, are other units that this unit requires in order to compile. The uses keyword is described in more detail a little later in the section, "The uses List."On line 7 you see a compiler directive that tells Delphi to include this project's resource file. Resource files are discussed in more detail on Day 8, "Creating Applications in Delphi."Line 9 contains the begin keyword, and line 13 contains the end keyword. Notice that the final end keyword in the unit is followed by a period. (A unit can have many code blocks ed with begin and end, but only one final end statement.) The code on lines 10, 11, and 12 is code that initializes the application, creates the application's main form, and starts the application running. You don't need to be concerned about the details of this code to write Delphi programs.