mainunit.pas

来自「Delphi编写的通讯录」· PAS 代码 · 共 52 行

PAS
52
字号
unit MainUnit;

interface

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

type
  TAboutForm = class(TForm)
    Label1: TLabel;
    Image1: TImage;
    SpeedButton1: TSpeedButton;
    Label2: TLabel;
    Label3: TLabel;
    Label4: TLabel;
    procedure FormShow(Sender: TObject);
    procedure SpeedButton1Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  AboutForm: TAboutForm;

implementation

uses LoginUnit, AboutUnit;

{$R *.dfm}

procedure TAboutForm.FormShow(Sender: TObject);
Var
  MemInfo:MEMORYSTATUS;
  s:integer;
begin
  MemInfo.dwLength:=sizeof(MEMORYSTATUS);
  GlobalMemoryStatus(MemInfo);
  s:=meminfo.dwTotalPhys div 1024;
  label1.Caption:='WINDOWS 的可用物理内存共有:    '+inttostr(s)+' KB';

end;

procedure TAboutForm.SpeedButton1Click(Sender: TObject);
begin
  Aboutform.Close;
end;

end.

⌨️ 快捷键说明

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