?? about.~pas
字號:
unit about;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, ExtCtrls, shellapi;
type
Tfrmabout = class(TForm)
btnyes: TButton;
Panel1: TPanel;
Label1: TLabel;
Label2: TLabel;
Bevel1: TBevel;
Bevel3: TBevel;
lblOS: TLabel;
lblMemory: TLabel;
procedure btnyesClick(Sender: TObject);
procedure Label2DblClick(Sender: TObject);
procedure FormCreate(Sender: TObject);
private
procedure GetMemoryInfo;
procedure GetOSInfo;
{ Private declarations }
public
{ Public declarations }
end;
var
frmabout: Tfrmabout;
implementation
{$R *.dfm}
procedure Tfrmabout.GetMemoryInfo; //可用資源
var
MS: TMemoryStatus;
begin
MS.dwLength := SizeOf(TMemoryStatus);
GlobalMemoryStatus(MS);
lblMemory.Caption := lblMemory.Caption + FormatFloat('#,###" KB"', MS.dwTotalPhys div 1024);
end;
procedure Tfrmabout.GetOSInfo; //獲取系統信息
var
Platform: string;
BuildNumber: Integer;
begin
case Win32Platform of
VER_PLATFORM_WIN32_WINDOWS:
begin
Platform := 'Windows 95';
BuildNumber := Win32BuildNumber and $0000FFFF;
end;
VER_PLATFORM_WIN32_NT:
begin
Platform := 'Windows NT';
BuildNumber := Win32BuildNumber;
end;
else
begin
Platform := 'Windows';
BuildNumber := 0;
end;
end;
if (Win32Platform = VER_PLATFORM_WIN32_WINDOWS)
or (Win32Platform = VER_PLATFORM_WIN32_NT) then
begin
if Win32CSDVersion = ''
then lblOS.Caption := lblOS.Caption + Format('%s%s %d.%d (Build %d)', [Platform, #13, Win32MajorVersion, Win32MinorVersion, BuildNumber])
else lblOS.Caption := lblOS.Caption + Format('%s%s %d.%d (Build %d: %s)', [Platform, #13, Win32MajorVersion, Win32MinorVersion, BuildNumber, Win32CSDVersion]);
end else lblOS.Caption := lblOS.Caption + Format('%s%s %d.%d', [Platform, #13, Win32MajorVersion, Win32MinorVersion])
end;
procedure Tfrmabout.btnyesClick(Sender: TObject);
begin
Self.Close;
end;
procedure Tfrmabout.Label2DblClick(Sender: TObject);
begin
ShellExecute(Handle, 'open', PChar('mailto:nciwp@126.com?subject=關于電子通訊記錄&cc=niuchao1234@163.com'), nil, nil, SW_SHOW);
end;
procedure Tfrmabout.FormCreate(Sender: TObject);
begin
GetMemoryInfo;
GetOSInfo;
end;
end.
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -