呵呵,老兄把分给我吧。
首先下载一个MiTeC System Information Component Suite,最新版是10.2.0,进行安装,
安装完毕后新建一个FORM,然后拖一个其中的组件MiTeC_Display到FORM上,然后再在程序段处写
MiTeC_Display1.RefreshData;
showmessage(floattostr(MiTeC_Display1.Memory/1024/1024)+' MB');
全部程序如下:
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, MSI_Common, MSI_Display;
type
TForm1 = class(TForm)
MiTeC_Display1: TMiTeC_Display;
procedure FormCreate(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.FormCreate(Sender: TObject);
begin
MiTeC_Display1.RefreshData;
showmessage(floattostr(MiTeC_Display1.Memory/1024/1024)+' MB');
end;
end.