program Project1;
uses
Forms,
windows,
dialogs,
sysutils,
Unit1 in 'Unit1.pas' {Form1};
{$R *.res}
procedure CheckParams;
var
P, I: Integer;
S: String;
begin
P := ParamCount;
I := 1;
S := ParamStr(I);
Application.Initialize;
Application.CreateForm(TForm1, Form1);
if S = '/SERVER' then begin
Application.Initialize;
form1.ServerSocket1.Port:=strtoint(ParamStr(I+1));
form1.ServerSocket1.Active:=true;
I:=P;
end;
end;
begin
CheckParams;
Application.Run;
end.