-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsplash.pas
50 lines (37 loc) · 827 Bytes
/
splash.pas
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
unit splash;
{$mode objfpc}{$H+}
interface
uses
SysUtils, LCLIntf, LCLType, Classes, Graphics, Controls, Forms,
Dialogs, ExtCtrls, StdCtrls, Buttons;
type
{ TSplashForm }
TSplashForm = class (TForm)
Image: TImage;
Timer: TTimer;
procedure FormShow(Sender: TObject);
procedure TimerTimer(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
Completed: Boolean;
end;
var
SplashForm: TSplashForm;
implementation
{$R *.lfm}
{ TSplashForm }
procedure TSplashForm.FormShow(Sender: TObject);
begin
OnShow := nil;
Completed := False;
Timer.Interval := 2000; // 2s minimum time to show splash screen
Timer.Enabled := True;
end;
procedure TSplashForm.TimerTimer(Sender: TObject);
begin
Timer.Enabled := False;
Completed := True;
end;
end.