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

📄 about.pas

📁 < Delphi网络通信协议分析与应用实现>>一书的源代码。
💻 PAS
字号:
unit About;

interface

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

type
  TfrmAbout = class(TForm)
    Image1: TImage;
    Bevel1: TBevel;
    Label5: TLabel;
    Label6: TLabel;
    Button1: TButton;
    Label1: TLabel;
    Label2: TLabel;
    procedure FormClose(Sender: TObject; var Action: TCloseAction);
  private
    { Private declarations }
  public
    procedure Init;
  end;

procedure ShowAbout;

var
  frmAbout: TfrmAbout;

implementation

{$R *.DFM}

uses ShellAPI;

procedure ShowAbout;
begin
  Application.CreateForm(TfrmAbout, frmAbout);
  frmAbout.Init;
  frmAbout.ShowModal;
end;

procedure TfrmAbout.Init;
var MS: TMemoryStatus;
begin
  Image1.Picture.Assign(Application.Icon);
  GlobalMemoryStatus(MS);
  Label5.Caption:=Format('Windows 的可用物理内存:   %s', [FormatFloat('#,###" KB"', MS.dwTotalPhys / 1024)]);
  Label6.Caption:=Format('系统资源使用率:           %d%%',[MS.dwMemoryLoad]);
end;

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

end.

⌨️ 快捷键说明

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