johnbuckley
Technical User
Sorry if this is obvious - I'm a Delphi beginner:
I have a small programme which is a splash screen which shows a small image then runs another exe.
If I hardcode the other exe it works instantly , thus:
procedure TForm1.FormActivate(Sender: TObject);
begin
ExecuteFile('my.exe','','mypath',SW_SHOWMAXIMIZED);
end;
But if I pass the other file in as a start up parameter the splash screen takes about 2 seconds to display, thus:
procedure TForm1.FormActivate(Sender: TObject);
begin
ExecuteFile(paramstr(1),'','mypath',SW_SHOWMAXIMIZED);
end;
What am I doing wrong?
I have a small programme which is a splash screen which shows a small image then runs another exe.
If I hardcode the other exe it works instantly , thus:
procedure TForm1.FormActivate(Sender: TObject);
begin
ExecuteFile('my.exe','','mypath',SW_SHOWMAXIMIZED);
end;
But if I pass the other file in as a start up parameter the splash screen takes about 2 seconds to display, thus:
procedure TForm1.FormActivate(Sender: TObject);
begin
ExecuteFile(paramstr(1),'','mypath',SW_SHOWMAXIMIZED);
end;
What am I doing wrong?