📄 aboutqz.pas
字号:
unit about;
interface
uses Windows,Messages, SysUtils, Classes, Graphics, Forms, Controls, StdCtrls,
Buttons, ExtCtrls,Dialogs, RXCtrls;
type
TAboutform = class(TForm)
Panel4: TPanel;
SecretPanel1: TSecretPanel;
Panel3: TPanel;
ManuLb: TPanel;
PhoneLB: TPanel;
FaxLB: TPanel;
BitBtn1: TBitBtn;
Panel1: TPanel;
procedure FormCreate(Sender: TObject);
procedure FormShow(Sender: TObject);
procedure FormClose(Sender: TObject; var Action: TCloseAction);
procedure BitBtn1Click(Sender: TObject);
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Aboutform: TAboutform;
implementation
uses menu, FileCtrl,IniFiles;
const
ScreenWidth: LongInt = 800; {I designed my form in 800x600 mode.}
ScreenHeight: LongInt = 600;
{$R *.DFM}
procedure TAboutform.FormCreate(Sender: TObject);
var
inif:tinifile;
temp,path,filename,spname,gsmc,dh,cz,splash:string;
begin
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);
gsmc:=inif.ReadString('manuinfo','MANUFACTORY',temp);
dh:=inif.readstring('manuinfo','phone',temp);
cz:=inif.readstring('manuinfo','fax',temp);
inif.Free;
if spname='' then
begin
// rxLabel1.Caption:='巡检管理系统' ;
manulb.Caption :='公司名称:';
phonelb.Caption:='电话:';
faxlb.Caption:='传真:';
end
else
begin
// rxlabel1.Caption:=spname;
if gsmc<>'' then
manulb.Caption:='公司名称:'+gsmc
else
manulb.Caption:='';
if dh<>'' then
phonelb.Caption:='电话:'+dh
else
phonelb.Caption:='';
if cz<>'' then
faxlb.Caption:='传真:'+cz
else
faxlb.Caption:=''
end;
{ getmem(pc1,100);
try
INIFILE:=ExtractFileDir(Application.ExeName)+'\HdXGXT.INI';
if fileexists(INIFile) then
begin
getprivateprofilestring('MANUINFO','Manufactory','',pc1,30,pchar(INIFile));
ManuLb.caption:=pc1;
getprivateprofilestring('MANUINFO','Phone','(0571)8073230;8076404;8838594',pc1,30,pchar(INIFile));
PhoneLB.caption:='联系电话:'+pc1;
getprivateprofilestring('MANUINFO','Fax','(0571)8802138',pc1,30,pchar(INIFile));
FaxLB.Caption:='传真:'+pc1;
end else begin
ManuLb.caption:='';//
PhoneLB.caption:='联系电话:';
FaxLB.Caption:='传真:';
end
finally
freemem(pc1);
end;}
end;
procedure TAboutform.FormShow(Sender: TObject);
begin
if (screen.Height<600) and( screen.Width<800) then
begin
scaled:=true;
height:=260;//round(height*longint(screen.height)*96 / 600/screen.pixelsperinch);
width :=300;//round( width *longint(screen.width)*96 / 800/screen.pixelsperinch);
left:=162;//round((screen.Width-Width)/2);
top:=145;//round((screen.height-self.height)/2);
//ScaleControls(screen.width, 800);
//ScaleControls(96,screen.pixelsperinch);
end
else
begin
self.Height :=260;
self.Width :=300;
self.Top:=mainform.Height-mainform.clientheight+mainform.ToolBar2.Height+round((mainform.ClientHeight-mainform.ToolBar2.Height-mainform.StatusBar.Height-self.Height)/2);
self.Left:=round((mainform.Width-self.Width)/2);
end;
end;
procedure TAboutform.FormClose(Sender: TObject; var Action: TCloseAction);
begin
mainform.a1.Enabled :=true;
mainform.ToolButton12.Enabled:=true;
//action:=cafree;
end;
procedure TAboutform.BitBtn1Click(Sender: TObject);
begin
self.Close;
end;
procedure TAboutform.Button1Click(Sender: TObject);
begin
showmessage('width='+inttostr(self.width)+'--'+'height='+inttostr(self.height)+'--'+'left='+inttostr(self.left)+'--top='+inttostr(self.top));
end;
end.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -