I have a Delphi XE forms application where I want to add a way to start the application from commandline with input parameters. When starting the application this way, I don't want the mainform to show, instead I want the application to perform a task and close, similar to a normal console project
How do I go about this? In the project source, I have tried various iterations of
begin
Application.Initialize;
Application.MainFormOnTaskbar := True;
Application.CreateForm(TForm7, Form7);
if Paramstr(1) <> '' then begin
Application.MainForm.Hide;
end;
Application.Run;
end.
but the form shows up just the same. And the compiler won't let me set visible during onShow