![]() |
Ram auslastungs Progressbar
Wie kann ich bei Delphi (Logisch oder^^) eine Progressbar so einstellen,
dass sie die Prozentauslastung des Ram's zeigt? :?: Gruss HW764 |
Re: Ram auslastungs Progressbar
Delphi-Quellcode:
stefan
var
memory: TMemoryStatus; ... memory.dwLength := SizeOf(memory); GlobalMemoryStatus(memory); ... memory.dwAvailPhys // verfügbar! memory.dwTotalPhys // insgesamt |
Re: Ram auslastungs Progressbar
Kann mir nicht jemand ein Stück coden?
|
Re: Ram auslastungs Progressbar
Stefan hat dich schon alles geschrieben.
Hier nochmal inkl. ProgressBar-Code:
Delphi-Quellcode:
procedure TForm1.Timer1Timer(Sender: TObject);
var x, y : real; memory: TMemoryStatus; Auslastung: integer; begin memory.dwLength := SizeOf(memory); GlobalMemoryStatus(memory); x := memory.dwTotalPhys - memory.dwAvailPhys; y := memory.dwTotalPhys; Auslastung := round(((x/y)*100)); ProgressBar1.Position := Auslastung; end; |
Re: Ram auslastungs Progressbar
*Codelib-Alarm* :mrgreen:
|
Re: Ram auslastungs Progressbar
Ich wette das steht da schon drin ;-)
|
Re: Ram auslastungs Progressbar
Zitat:
Aber ich gebe es rein, ich muss mich nur nochmal vergewissern, ob's auch wirklich net drinsteht. ;) |
Re: Ram auslastungs Progressbar
Halllo Matze,
Delphi-Quellcode:
ist in Delphi 5 noch nicht enthalten, da GlobalMemoryStatus() aber eine Win32-API Funktion ist,
memory: TMemoryStatus;
dürften die API-Profis wohl kein Problem mit dem Nachbau der MEMORYSTATUS structure haben. (Wink mit dem Zaunpfahl :mrgreen: ) |
Re: Ram auslastungs Progressbar
Zitat:
|
Re: Ram auslastungs Progressbar
Naja,
wirklich nur ein ganz leises *LUCKIEEE* :mrgreen: :mrgreen: |
Alle Zeitangaben in WEZ +1. Es ist jetzt 21:52 Uhr. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz