Добавил:
Vezen
Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз:
Предмет:
Файл:Реализация алгоритмов шифрования на Delphi / Вижинер / Unit3
.pas unit Unit3;
interface
uses Windows, SysUtils, Classes, Graphics, Forms, Controls, StdCtrls,
Buttons, ExtCtrls, jpeg;
type
TAboutBox = class(TForm)
Panel1: TPanel;
ProgramIcon: TImage;
ProductName: TLabel;
Version: TLabel;
Copyright: TLabel;
Comments: TLabel;
OKButton: TButton;
Label1: TLabel;
Label2: TLabel;
Bevel1: TBevel;
procedure FormShow(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
AboutBox: TAboutBox;
implementation
{$R *.dfm}
procedure TAboutBox.FormShow(Sender: TObject);
var MStat:TMemoryStatus;
begin
GlobalMemoryStatus(MStat);
Label1.Caption :='Всего памяти: '+ FormatFloat('#,###" Кб"', MStat.dwTotalPhys/1024);
Label2.Caption :='Свободно: '+ Format('%d %%', [100-MStat.dwMemoryLoad]);
end;
end.
interface
uses Windows, SysUtils, Classes, Graphics, Forms, Controls, StdCtrls,
Buttons, ExtCtrls, jpeg;
type
TAboutBox = class(TForm)
Panel1: TPanel;
ProgramIcon: TImage;
ProductName: TLabel;
Version: TLabel;
Copyright: TLabel;
Comments: TLabel;
OKButton: TButton;
Label1: TLabel;
Label2: TLabel;
Bevel1: TBevel;
procedure FormShow(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
AboutBox: TAboutBox;
implementation
{$R *.dfm}
procedure TAboutBox.FormShow(Sender: TObject);
var MStat:TMemoryStatus;
begin
GlobalMemoryStatus(MStat);
Label1.Caption :='Всего памяти: '+ FormatFloat('#,###" Кб"', MStat.dwTotalPhys/1024);
Label2.Caption :='Свободно: '+ Format('%d %%', [100-MStat.dwMemoryLoad]);
end;
end.