-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathSplash.pas
48 lines (37 loc) · 953 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
unit Splash;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, jpeg, ExtCtrls;
type
TSplashForm = class(TForm)
LoadingLabel: TLabel;
Logo: TImage;
CloseTimer: TTimer;
procedure FormCloseQuery(Sender: TObject; var CanClose: Boolean);
procedure CloseTimerTimer(Sender: TObject);
procedure FormActivate(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
SplashForm: TSplashForm;
implementation
{$R *.dfm}
// Fortæller vinduet hvornår det må lukke.
procedure TSplashForm.FormActivate(Sender: TObject);
begin
ShowWindow(Application.Handle, SW_HIDE);
end;
procedure TSplashForm.FormCloseQuery(Sender: TObject; var CanClose: Boolean);
begin
canclose:= not CloseTimer.Enabled;
end;
// Stopper timeren.
procedure TSplashForm.CloseTimerTimer(Sender: TObject);
begin
CloseTimer.Enabled:=false;
end;
end.