Ich weis nicht, ob ich deine Anforderungen richtig verstanden habe. Hier meine Interpretation:
Unit frm_Splash.pas
Delphi-Quellcode:
procedure ShowSplash;
begin
if not Assigned(frmSplash) then
frmSplash := TfrmSplash.Create(Application);
frmSplash.Show;
frmSplash.Update
end;
procedure CloseSplash;
begin
FreeAndNil(frmSplash);
end;
*.dpr Datei
Delphi-Quellcode:
ShowSplash;
Application.Initialize;
Application.CreateForm(TfrmMain, frmMain);
Unit frm_Main.pas
Delphi-Quellcode:
procedure TfrmMain.FormShow(Sender: TObject);
begin
PostMessage(
Handle, WM_SETUPAPPLICATION, 0, 0);
end;
procedure TfrmMain.WMSetupApplication(
var pmvMessage: TMessage);
begin
CloseSplash;
end;
Bis bald...
Thomas