Einzelnen Beitrag anzeigen

150gozilla

Registriert seit: 1. Sep 2005
Ort: Taunusstein
116 Beiträge
 
Delphi 5 Professional
 
#1

Auslastung in Progressbar/gauge

  Alt 5. Sep 2005, 11:46
Hallo liebe user
1)
Ich habe folgendes Problem und zwar habe ich bis jetzt so gemacht das meine RAM(Speicher)auslastung in einer Progressbar angezeigt wird.
Ich brauche dafür nur einen Timer und eine Progressbar
Delphi-Quellcode:
procedure TForm1.Timer2Timer(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;
Das kommt natürlich alles in den timer.
Ist es möglich diesen wert in eine gauge umzuschreiben?


2)
Gibts auch eine möglichkeit die CPU auslastung auszulesen ?
Chris
  Mit Zitat antworten Zitat