Search results for 'Get System Memory Status'. 1 post(s) found.
- 2007/09/20 Get system info (free memory, etc)
Put a TMemo (Memo1) and a TButton (Button1) in your form. Put this code into OnClick of Button1:
procedure TForm1.Button1Click(Sender: TObject) ;
var MemoryStatus: TMemoryStatus;
begin
Memo1.Lines.Clear;
MemoryStatus.dwLength := SizeOf(MemoryStatus) ;
GlobalMemoryStatus(MemoryStatus) ;
with MemoryStatus do begin
Memo1.Lines.Add(IntToStr(dwLength) +
' Size of ''MemoryStatus'' record') ;
Memo1.Lines.Add(IntToStr(dwMemoryLoad) +
'% memory in use') ;
Memo1.Lines.Add(IntToStr(dwTotalPhys) +
' Total Physical Memory in bytes') ;
Memo1.Lines.Add(IntToStr(dwAvailPhys) +
' Available Physical Memory in bytes') ;
Memo1.Lines.Add(IntToStr(dwTotalPageFile) +
' Total Bytes of Paging File') ;
Memo1.Lines.Add(IntToStr(dwAvailPageFile) +
' Available bytes in paging file') ;
Memo1.Lines.Add(IntToStr(dwTotalVirtual) +
' User Bytes of Address space') ;
Memo1.Lines.Add(IntToStr(dwAvailVirtual) +
' Available User bytes of address space') ;
end;
end;
var MemoryStatus: TMemoryStatus;
begin
Memo1.Lines.Clear;
MemoryStatus.dwLength := SizeOf(MemoryStatus) ;
GlobalMemoryStatus(MemoryStatus) ;
with MemoryStatus do begin
Memo1.Lines.Add(IntToStr(dwLength) +
' Size of ''MemoryStatus'' record') ;
Memo1.Lines.Add(IntToStr(dwMemoryLoad) +
'% memory in use') ;
Memo1.Lines.Add(IntToStr(dwTotalPhys) +
' Total Physical Memory in bytes') ;
Memo1.Lines.Add(IntToStr(dwAvailPhys) +
' Available Physical Memory in bytes') ;
Memo1.Lines.Add(IntToStr(dwTotalPageFile) +
' Total Bytes of Paging File') ;
Memo1.Lines.Add(IntToStr(dwAvailPageFile) +
' Available bytes in paging file') ;
Memo1.Lines.Add(IntToStr(dwTotalVirtual) +
' User Bytes of Address space') ;
Memo1.Lines.Add(IntToStr(dwAvailVirtual) +
' Available User bytes of address space') ;
end;
end;
Another posts included in "Delphi"
| Get dimensions of usable space on monitor (work area) (0) | 2007/09/20 |
| Get text from the control at pos x,y on screen (0) | 2007/09/20 |
| How to determine the output of a console application ? (0) | 2007/09/20 |
| How to Get Filenames from Clipboard ? (0) | 2007/09/20 |
| How to Get Windows OS Version ? (0) | 2007/09/20 |
| Get Windows Temp directory (0) | 2007/09/20 |
| Disable ALT+TAB, CTRL+ESC, CTRL+ALT+DEL (0) | 2007/09/19 |
| Display Standard Windows Properties dialog (0) | 2007/09/19 |
Trackback : Cannot send a trackbact to this post.
-
Subject different money making ideas
2010/01/29 05:28
moneyideas
-
Subject different money making ideas
2010/01/29 14:22
moneyideas
-
Subject different money making ideas
2010/01/31 16:40
moneyideas

Prev

Rss Feed