转抄的,或许可以实现你的要求;
unit about;
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
StdCtrls, ExtCtrls, jpeg, XPMenu;
type
Tab = class(TForm)
Button1: TButton;
Bevel2: TBevel;
Bevel1: TBevel;
Panel1: TPanel;
Image1: TImage;
GroupBox1: TGroupBox;
Label1: TLabel;
Label2: TLabel;
Label3: TLabel;
Label4: TLabel;
Label5: TLabel;
Label7: TLabel;
LBLOS: TLabel;
lblMemory: TLabel;
XPMenu1: TXPMenu;
procedure Button1Click(Sender: TObject);
procedure FormCreate(Sender: TObject);
private
{ Private declarations }
// s:string;
procedure GetOSInfo; //系统信息程序
Procedure GetMemoryInfo ; //可用资源程序
public
{ Public declarations }
end;
var
ab: Tab;
implementation
{$R *.DFM}
procedure Tab.Button1Click(Sender: TObject);
begin
ab.Close;
end;
Procedure Tab.GetMemoryInfo ;//可用资源
var
MS: TMemoryStatus;
begin
MS.dwLength:=SizeOf(TMemoryStatus);
GlobalMemoryStatus(MS);
lblMemory.Caption:=lblMemory.Caption +FormatFloat('#,###" KB "',MS.dwTotalPhys div 1024);
end;
procedure Tab.GetOSInfo; //获取系统信息
var
Platform: string;
BuildNumber: Integer;
begin
case Win32Platform of
VER_PLATFORM_WIN32_WINDOWS:
begin
Platform := 'Microsoft Windows 95 ';
BuildNumber := Win32BuildNumber and $0000FFFF;
end;
VER_PLATFORM_WIN32_NT:
begin
Platform := 'Microsoft Windows NT';
BuildNumber := Win32BuildNumber;
if Win32MajorVersion=5.0 then
Platform := 'Microsoft Windows 2000 ';
end;
else
begin
Platform := 'Microsoft 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 Tab.FormCreate(Sender: TObject);
begin
try
Caption:='关于 '+application.Title;
//ProgramIcon.Picture.icon:=Application.Icon;
// ProductName.Caption:=ProductName.Caption+Application.Title;
//version.Caption:=version.Caption+ver;
//Copyright.Caption:=Copyright.Caption+'茂一电子股份有限公司';
//Author.Caption:=Author.Caption+'茂一资讯组 郭宇城';
// Others.Caption:='程序运行于Win98~Win2000,ACCESS 2000支持!';
//初始化---------------------------
GetMemoryInfo;
GetOsinfo;
{***********************}
//初始化变量s...
// s:='';
except
MessageBox(handle,'某些信息不能取得','提示',MB_OK);
end;
end;