aboutsoft.~pas

来自「有不足之处请指出」· ~PAS 代码 · 共 55 行

~PAS
55
字号
unit AboutSoft;

interface

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

type
  TAboutForm = class(TForm)
    Image1: TImage;
    Label1: TLabel;
    Label2: TLabel;
    Label3: TLabel;
    Label4: TLabel;
    Button1: TButton;
    Label5: TLabel;
    Label6: TLabel;
    Label7: TLabel;
    procedure FormClose(Sender: TObject; var Action: TCloseAction);
    procedure FormShow(Sender: TObject);
    procedure Button1Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  AboutForm: TAboutForm;

implementation

{$R *.dfm}

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

procedure TAboutForm.FormShow(Sender: TObject);
var MyMemoryStatus: TMemoryStatus;
begin
  GlobalMemoryStatus(MyMemoryStatus);
  Label2.Caption :=FormatFloat('#,###" KB"',MyMemoryStatus.dwTotalPhys/1024);
  Label4.Caption :=Format('%d%%',[MyMemoryStatus.dwMemoryLoad]);
end; //内存使用情况

procedure TAboutForm.Button1Click(Sender: TObject);
begin
close;
end;

end.

⌨️ 快捷键说明

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