Sub Main 開始手続き

Delphi で最初に実行される手続きはプロジェクトのソースです。
[ 表示] メニューから "ユニットの表示" を選び、ユニット一覧からプロジェクトを選択します。するとプロジェクトのソースが表示されます。
Delphiが最初に実行するのはここです。

■ プロジェクトソースの一例
program Project1;

uses
  Forms,
  Unit1 in 'Unit1.pas' {Form1};

{$R *.RES}

begin
  Application.Initialize;
  Application.CreateForm(TForm1, Form1);  
  Application.Run;
end.

■ プロジェクトソースの修正例
program Project1;

uses
  Forms,
  Dialogs,
  Unit1 in 'Unit1.pas' {Form1};

{$R *.RES}

begin
  Application.Initialize;
  //
  if  ParamCount  > 0 then  begin
    ShowMessage(ParamStr(1));
  end;
  //
  Application.CreateForm(TForm1, Form1);  
  Application.Run;
end.