📄 wmlogodrawform.pas
字号:
unit WMLogoDrawForm;
interface
uses
IniFiles,
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, ExtCtrls, StdCtrls;
type
TWMLandGoForm = class(TForm)
Timer1: TTimer;
Panel1: TPanel;
Image1: TImage;
Label1: TLabel;
Label2: TLabel;
Label3: TLabel;
procedure Timer1Timer(Sender: TObject);
procedure FormCreate(Sender: TObject);
procedure FormDestroy(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
WMLandGoForm: TWMLandGoForm;
implementation
{$R *.dfm}
procedure TWMLandGoForm.Timer1Timer(Sender: TObject);
begin
Close;
end;
procedure TWMLandGoForm.FormCreate(Sender: TObject);
Var
AIniFileName : String;
AIniFile : TIniFile;
begin
AIniFileName := ExtractFilePath(Application.ExeName)+'Config\Config.ini';
AIniFile := TIniFile.Create(AIniFileName);
try
Label2.Caption :=AIniFile.ReadString('MateFile','ICount','');
finally
AIniFile.Free;
end;
Timer1.Enabled := True;
end;
procedure TWMLandGoForm.FormDestroy(Sender: TObject);
Var
IniFileName:String;
IniFile:TIniFile;
total:Integer;
begin
IniFileName:=ExtractFilePath(Application.ExeName)+'Config\Config.ini';
IniFile:=TIniFile.Create(IniFileName);
try
total:=IniFile.ReadInteger('MateFile','ICount',1);
total:=total+1;
Label2.Caption := InttoStr(total);
IniFile.WriteString('MateFile','ICount',Label2.Caption);
finally
IniFile.Free;
end;
if StrtoInt(Label2.Caption) >= 32 then
begin
Application.MessageBox('你使用的次数以到,请和系统管理员联系... ','系统提示... ',MB_IConStop);
Application.Terminate;
end;
end;
end.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -