I am using the code from this question to create a splash screen in Delphi.
It looks something like this:
begin
SplashForm := TSplashForm.Create(nil)
Application.Initialize;
//create your forms, initialise database connections etc here
Application.CreateForm(TForm1, Form1);
if Assigned(SplashForm) then
SplashForm.OkToClose := True;
Application.Run;
end.
For technical reasons, in the Project file I keep
Application.MainFormOnTaskbar := False;
What happens is that an icon displays in the Taskbar for the splash screen, then as the splash screen is closed, the icon disappears, and then the icon is reshown in the taskbar (for the main form).
How can I prevent the icon showing while the splash screen/form is showing? (so that the icon will only show once, when the main form is displayed).