AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren
Zurück Delphi-PRAXiS Tutorials Delphi Tutorial: Splash Screens
Tutorial durchsuchen
Ansicht
Themen-Optionen

Tutorial: Splash Screens

Ein Tutorial von sakura · begonnen am 9. Sep 2003 · letzter Beitrag vom 31. Jan 2009
Antwort Antwort
Benutzerbild von xZise
xZise

Registriert seit: 3. Mär 2006
Ort: Waldbronn
4.303 Beiträge
 
Delphi 2009 Professional
 
#1

Re: Tutorial: Splash Screens

  Alt 8. Jul 2006, 20:06
Seltsam...

Ich habe folgenden Code:
Delphi-Quellcode:
begin
  FSplash := TFSplash.Create(Application);
  try
    FSplash.Show;
    FSplash.Refresh;
    Application.Initialize;
    Application.Title := 'TrackMania IPC';
    Application.CreateForm(TFForm, FForm);
    Application.CreateForm(TForm1, Form1);
  finally
    FSplash.InitializationDone := True;
  end;
  Application.Run;
  FForm.Visible := false;
end.
Splash:
Delphi-Quellcode:
procedure TFSplash.Show;
var i : Integer;
begin
  inherited;
  for i := 0 to 255 do begin
    AlphaBlendValue := i;
    Application.ProcessMessages;
    Sleep(2);
  end;


end;

procedure TFSplash.FormClose(Sender: TObject; var Action: TCloseAction);
var i : Integer;
begin
  for i := 255 downto 0 do begin
    AlphaBlendValue := i;
    Application.ProcessMessages;
    Sleep(2);
  end;
  Action := caFree;
  UIPC.FForm.Enabled := true;
  FSplash := nil;
end;

procedure TFSplash.FormCloseQuery(Sender: TObject; var CanClose: Boolean);
begin
  CanClose := (not Timer.Enabled) and FInitializationDone;
end;

procedure TFSplash.SetInitializationDone(const Value: Boolean);
begin
  FInitializationDone := Value;
  Close;
end;

procedure TFSplash.TimerTimer(Sender: TObject);
begin
  Timer.Enabled := False;
  Close;
end;

end.
Ich habe außer dort beim Fade KEIN Sleep.
Fabian
Eigentlich hat MS Windows ab Vista den Hang zur Selbstzerstörung abgewöhnt – mkinzler
  Mit Zitat antworten Zitat
Antwort Antwort


Forumregeln

Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are aus

Gehe zu:

Impressum · AGB · Datenschutz · Nach oben
Alle Zeitangaben in WEZ +1. Es ist jetzt 05:00 Uhr.
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz