📄 usplash.pas
字号:
unit USplash;
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
StdCtrls, jpeg, ExtCtrls;
type
TSplashForm = class(TForm)
ImageSplash: TImage;
private
{ Private declarations }
public
{ Public declarations }
end;
var
SplashForm: TSplashForm;
procedure ShowSplashFrm;
procedure Delay(Value: Integer);
implementation
{$R *.DFM}
procedure ShowSplashFrm;
var
SplashFrm: TSplashForm;
begin
SplashFrm := TSplashForm.Create(Application);
SplashFrm.Show;
Delay(2000);
SplashFrm.Hide;
SplashFrm.Free;
end;
procedure Delay(Value: Integer);
var
StartTime,EndTime: TDateTime;
Hour,Min,Sec,MSec: Word;
StartMSec,EndMSec: LongInt;
begin
StartTime := Time;
DecodeTime(StartTime,Hour,Min,Sec,MSec);
StartMSec := Hour * 3600 * 1000 + Min * 60 * 1000 + Sec * 1000 + MSec;
EndMSec := StartMSec;
while (EndMSec - StartMSec < Value) do
begin
EndTime := Time;
DecodeTime(EndTime,Hour,Min,Sec,MSec);
EndMSec := Hour * 3600 * 1000 + Min * 60 * 1000 + Sec * 1000 + MSec;
Application.ProcessMessages;
end;
end;
end.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -