⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 about.pas

📁 清华大学物理实验室 - 仪器管理系统 能实现实验室中多项数据的保存,插入,删除等
💻 PAS
字号:
unit About;

interface

uses Windows, SysUtils, Classes, Graphics, Forms, Controls, StdCtrls,
  Buttons, ExtCtrls,Dialogs;

type
  Tfrm_About = class(TForm)
    Panel1: TPanel;
    ProgramIcon: TImage;
    ProductName: TLabel;
    Version: TLabel;
    Copyright: TLabel;
    others: TLabel;
    mantousoft: TPaintBox;
    BitBtn1: TBitBtn;
    Bevel1: TBevel;
    lblOs: TLabel;
    lblMemory: TLabel;
    procedure FormCreate(Sender: TObject);
    procedure ProgramIconClick(Sender: TObject);
    procedure OKButtonClick(Sender: TObject);
    procedure FormKeyPress(Sender: TObject; var Key: Char);
    procedure FormClose(Sender: TObject; var Action: TCloseAction);
  private
  { Private declarations }
    s:string;
    Procedure Delay(x,y:word);//延时程序
    procedure GetOSInfo;      //系统信息程序
    Procedure GetMemoryInfo ; //可用资源程序
  public
  { Public declarations }
end;

var
  frm_About: Tfrm_About;

implementation

{$R *.DFM}
Procedure Tfrm_About.GetMemoryInfo ;//可用资源
var
  MS: TMemoryStatus;
begin
  MS.dwLength:=SizeOf(TMemoryStatus);
  GlobalMemoryStatus(MS);
  lblMemory.Caption:=lblMemory.Caption +FormatFloat('#,###" KB"',MS.dwTotalPhys div 1024);
end;

procedure Tfrm_About.GetOSInfo; //获取系统信息
var
  Platform: string;
  BuildNumber: Integer;
begin
  case Win32Platform of
  VER_PLATFORM_WIN32_WINDOWS:
    begin
      Platform := 'Windows 98';
      BuildNumber := Win32BuildNumber and $0000FFFF;
    end;
  VER_PLATFORM_WIN32_NT:
    begin
      Platform := 'Windows NT';
      BuildNumber := Win32BuildNumber;
    end;
    else
    begin
      Platform := 'Windows';
      BuildNumber := 0;
    end;
  end;

  if(Win32Platform = VER_PLATFORM_WIN32_WINDOWS)
    or(Win32Platform = VER_PLATFORM_WIN32_NT) then
  begin
    if Win32CSDVersion = ''
    then lblOS.Caption := lblOS.Caption+Format('%s %d.%d (Build %d)',[Platform,Win32MajorVersion,Win32MinorVersion,BuildNumber])
    else lblOS.Caption := lblOS.Caption+Format('%s %d.%d (Build %d: %s)',[Platform,Win32MajorVersion,Win32MinorVersion, BuildNumber,Win32CSDVersion]);
  end else lblOS.Caption := lblOS.Caption+Format('%s %d.%d', [Platform,Win32MajorVersion,Win32MinorVersion])
end;

procedure Tfrm_About.Delay(x,y:word);
var
  timeout:TDateTime;
begin
  //启动时间这个函数来做!
  timeout:=now+encodeTime(0,x div 60,x mod 60,y);
  While now<timeout do Application.ProcessMessages;
end;


procedure Tfrm_About.FormCreate(Sender: TObject);
begin
  try
    Caption:='关于'+application.Title+'';                    //标题
    ProgramIcon.Picture.icon:=Application.Icon;                //图标
    ProductName.Caption:=ProductName.Caption+Application.Title;//产品名称
    version.Caption:=version.Caption+'1.00';                   //版本
    Copyright.Caption:=Copyright.Caption+'1+2 工作室 ';
    others.Caption:='警告:系统在运行过程中出现的任何问题作者将不负'
    +#13#10+
    '任何责任!';
    //初始化---------------------------
    GetMemoryInfo;
    GetOsinfo;
    {***********************}
    //初始化变量s...
    s:='';
  except
    MessageBox(handle,'某些信息不能取得','提示',MB_OK);
  end;
  //ProgramIconClick(nil);
end;

procedure Tfrm_About.ProgramIconClick(Sender: TObject);
var
  i,fontheight:Byte;
begin
  try
    Panel1.Hide;
    fontheight:=mantousoft.Canvas.TextHeight('A');
    for i:=0 to 150+fontHeight*8 do
     if not Panel1.Visible then //在此处添加说明
        with mantousoft.Canvas do
        begin
          textout(25,100-i,'        感谢您使用"'+Application.Title+'"系统!');
          textout(25,100+fontheight-i,'☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆');
          textout(25,100+fontheight*2-i,'                     系统说明');
          textout(25,100+fontheight*3-i,'    软件作者:黑 马');
          textout(25,100+fontheight*4-i,'    开发前端:Borland Delphi 6.0');
          textout(25,100+fontheight*5-i,'    数据处理:Borland Paradox 7.0');
          textout(25,100+fontheight*6-i,'    开发周期:2001/10/13-2001/10/18');
          textout(25,100+fontheight*7-i,'☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆');
          textout(25,100+fontheight*8-i,'                     技术支持');
          textout(25,100+fontheight*9-i,'    热线支持:(010)62425867 ');
          textout(25,100+fontheight*10-i,'   电子邮件:darkhorse2008@163.com');
          textout(25,100+fontheight*11-i,'   网上服务:http://www.delphiboy.com');
          textout(25,100+fontheight*12-i,'☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆');
          textout(25,100+fontheight*13-i,'        1+2  工作室 ');
          textout(25,100+fontheight*14-i,'          2001/10/16');
          Delay(0,20);
        end;
  finally
    Panel1.Show;
    Refresh;
  end;
end;

procedure Tfrm_About.OKButtonClick(Sender: TObject);
begin
  Panel1.Show;
  Refresh;
  close;
end;

procedure Tfrm_About.FormKeyPress(Sender: TObject; var Key: Char);
begin
  s:=s+key;
  if StrUpper(Pchar(s))='SOFT' then
  begin
    ProgramIconclick(sender);
    s:=''
  end;
end;

procedure Tfrm_About.FormClose(Sender: TObject; var Action: TCloseAction);
begin
  Action:=caFree;
end;

end.

 

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -