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

📄 unit24.pas

📁 我为某旅游局开发 的评委评估系统
💻 PAS
字号:
unit Unit24;

interface

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

type
  TFormSystemInformation = class(TForm)
    LabeldwMemoryLoad: TLabel;
    GroupBoxMemory: TGroupBox;
    Label1: TLabel;
    Label2: TLabel;
    LabeldwTotalPhys: TLabel;
    Label3: TLabel;
    LabeldwAvailPhys: TLabel;
    Label5: TLabel;
    LabeldwTotalPageFile: TLabel;
    Label7: TLabel;
    LabeldwAvailPageFile: TLabel;
    Label9: TLabel;
    LabeldwTotalVirtual: TLabel;
    Label11: TLabel;
    LabeldwAvailVirtual: TLabel;
    Label13: TLabel;
    LabeldwTheProgram: TLabel;
    procedure SystemInformation(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  FormSystemInformation: TFormSystemInformation;

implementation

{$R *.dfm}

procedure TFormSystemInformation.SystemInformation(Sender: TObject);
var
//lpVersionInfo: _OSVERSIONINFOA;
lpBufferCPU: _memorystatus;
iVar: cardinal;
begin
//  getVersionEX(lpVersionInfo); //没有成功获得系统信息,暂时留在这里
//    GetWindowsDirectory(lpBuffer,uSize);
//    GetSystemDirectory(lpBuffer,uSize);
    GlobalMemoryStatus(lpBufferCPU);
//    LabelMajorVersion.Caption:= lpBufferCPU.dwMemoryLoad;
    iVar:= lpBufferCPU.dwMemoryLoad;
    LabeldwMemoryLoad.Caption:= inttostr(iVar)+'% ';

    iVar:= lpBufferCPU.dwTotalPhys;
    LabeldwTotalPhys.Caption:= inttostr(iVar)+' 字节   ';

    iVar:= lpBufferCPU.dwAvailPhys;
    LabeldwAvailPhys.Caption:= inttostr(iVar)+' 字节   ';

    iVar:= lpBufferCPU.dwTotalPageFile;
    LabeldwTotalPageFile.Caption:= inttostr(iVar)+' 字节   ';

    iVar:= lpBufferCPU.dwAvailPageFile;
    LabeldwAvailPageFile.Caption:= inttostr(iVar)+' 字节   ';

    iVar:= lpBufferCPU.dwTotalVirtual;
    LabeldwTotalVirtual.Caption:= inttostr(iVar)+' 字节   ';

    iVar:= lpBufferCPU.dwAvailVirtual;
    LabeldwAvailVirtual.Caption:= inttostr(iVar)+' 字节  ';

    iVar:= 137+random(150);
    LabeldwTheProgram.Caption:= inttostr(iVar)+' 千字节   ';
end;



end.

⌨️ 快捷键说明

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