📄 splash.~pas
字号:
unit Splash;
interface
uses
SysUtils, Windows, Messages, Classes, Graphics, Controls,
Forms, Dialogs, StdCtrls, ExtCtrls, RXCtrls, ComCtrls;
type
TSplashForm = class(TForm)
Panel1: TPanel;
Image1: TImage;
Timer1: TTimer;
RxLabel1: TRxLabel;
label3: TRxLabel;
procedure FormCreate(Sender: TObject);
procedure FormShow(Sender: TObject);
procedure Timer1Timer(Sender: TObject);
procedure FormActivate(Sender: TObject);
end;
var
SplashForm: TSplashForm;
implementation
uses FileCtrl,IniFiles;
{$R *.DFM}
procedure TSplashForm.FormCreate(Sender: TObject);
var
inif:tinifile;
temp,path,filename,spname:string;
begin
//getdir(0,path);
//filename:=path+'\HdXGXT.ini';
filename:=ExtractFiledir(APPLICATION.EXENAME)+'\'+ExtractFilename(APPLICATION.EXENAME);//+'\hdxgxt.ini';
if not fileexists(filename) then
filename:=ExtractFileDir(APPLICATION.EXENAME)+'hdxgxt.ini'
else filename:=extractfiledir(application.exename)+'\hdxgxt.ini';
inif:=TInifile.Create(filename);
spname:=inif.readstring('manuinfo','SPLASHNAME',temp);
if spname='' then
Label3.Caption:='巡更管理系統'
else
label3.Caption:=spname;
inif.free;
{ try
getmem(pc1,100);
INIFILE:=ExtractFileDir(Application.ExeName)+'\HdXGXT.INI';
if fileexists(INIFile) then
begin
getprivateprofilestring(pchar('MANUINFO'),pchar('SPLASHNAME'),
pchar('汉达'),pc1,16,pchar(INIFile));
Label3.caption:=pc1+'巡更系统';
end else Label3.caption:='巡更系统';
finally
freemem(pc1);
end; }
end;
procedure TSplashForm.FormShow(Sender: TObject);
begin
self.Width :=239;
self.Height :=153;
scaled:=true;
// height:=round(height*longint(screen.height)*96 / 600/screen.pixelsperinch);
// width :=round( width *longint(screen.width)*96 / 800/screen.pixelsperinch);
left:=round((screen.Width-Width)/2);
top:=round((screen.height-self.height)/2);
ScaleControls(screen.width, 800);
ScaleControls(96,screen.pixelsperinch);
label3.Font.Size:=12;
rxlabel1.Font.Size:=10;
end;
procedure TSplashForm.Timer1Timer(Sender: TObject);
begin
//if progressbar1.Position<=progressbar1.Max then
//progressbar1.Position:=progressbar1.Position+33;
end;
procedure TSplashForm.FormActivate(Sender: TObject);
begin
//if progressbar1.Position<=progressbar1.Max then
//progressbar1.Position:=progressbar1.Position+50;
end;
end.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -