Autor Beitrag
Chris Maslowski
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 109



BeitragVerfasst: Sa 12.03.05 21:06 
Hallo Leute 8)
Weiß jemand wie ich die Prozessorleistung und den ganzen Kram in einem Programm anzeigen lassen kann :?:
Ich will mir nämlich eine Leiste erstellen die die aktuelle Leistung des PC's anzeigt. So ählich wie die Windows Taskleiste.


Moderiert von user profile iconraziel: Topic aus Neue Einträge / Hinweise / etc. verschoben am Sa 12.03.2005 um 20:10
Kroni
ontopic starontopic starontopic starontopic starontopic starofftopic starofftopic starofftopic star
Beiträge: 720

Win 98, Win ME, Win2k, Win XP
D3 Pro
BeitragVerfasst: Sa 12.03.05 22:01 
lass doch einfach den Taskmanager anzeigen!
opfer.der.genauigkeit
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 754
Erhaltene Danke: 1



BeitragVerfasst: Sa 12.03.05 22:04 
user profile iconChris Maslowski hat folgendes geschrieben:

Ich will mir nämlich eine Leiste erstellen die die aktuelle Leistung des PC's anzeigt.


Ich glaube er will das selber machen @Kroni. :wink:

Chris schau mal bei JEDI -> www.delphi-jedi.org/

Da gibt es eine entsprechende Systembibliothek dazu, soweit ich mich erinnere.

_________________
Stellen Sie sich bitte Zirkusmusik vor.
3rdnuss
ontopic starontopic starontopic starontopic starontopic starofftopic starofftopic starofftopic star
Beiträge: 139



BeitragVerfasst: Sa 12.03.05 22:26 
Hi.

Also, das ist der code, um die aktuelle CPU geschwindigkeit zu ermitteln:

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
function Herz : Double;  {$O-}
var
  TimerHigh, TimerLow: DWORD;
begin
  SetPriorityClass(GetCurrentProcess, REALTIME_PRIORITY_CLASS);
  SetThreadPriority(GetCurrentThread, THREAD_PRIORITY_TIME_CRITICAL);
  asm
    push    10
    call    Sleep;
    dw      310Fh
    mov     TimerLow, eax
    mov     TimerHigh, edx
    push    500
    call    Sleep
    dw      310Fh
    sub     eax, TimerLow
    sbb     edx, TimerHigh
    mov     TimerLow,  eax
    mov     TimerHigh, edx
  end;
  Result := TimerLow / 500000.0;
end;        {$O+}


begin
 label1.caption := (FloatToStr(Herz));


...und das ist der code für das Anzeigen des Arbeitsspeichers:..

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
var
  Memory: TMemoryStatus;
begin
  Memory.dwLength := Sizeof (Memory);

  GlobalMemoryStatus(Memory);
  Canvas.Font.Name := 'terminal';

 Canvas.Font.Height := 16;
  Canvas.TextOut(1010'Speicher:         ' +
    IntToStr(Memory.dwTotalPhys div 1048576) + ' MByte');
  Canvas.TextOut(1030'Freier Speicher:  ' +
    IntToStr(Memory.dwAvailPhys div 1048576) + ' MByte');



PS: @ chris: Wir sind ja fast Nachbarn^^
Chris Maslowski Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 109



BeitragVerfasst: So 13.03.05 19:15 
Titel: Ich hätte da noch 'ne Frage
Hallo Leute :wink:
Das klappt bei mir alles sehr gut, dafür wolte ich mich erst einmal bedanken :)
Doch ich hab da noch ein Problem. :gruebel: Wenn ich das Programm starte, erscheint wie bei jedem anderen ein Fenster unten in der Taskleiste.
Doch gerade das will ich nicht. Es soll ein ymbol unten rechts in der Leiste erscheinen, also da wo auch die Uhrzeit steht.
retnyg
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 2754

SNES, GB, GBA, CPC, A500, 486/66, P4/3.0HT: NintendOS, AmigaOS, DoS
Delphi 5, Delphi 7
BeitragVerfasst: So 13.03.05 19:23 
das ding da unten bei der uhrzeit nennt sich sich Suche in: Delphi-Forum, Delphi-Library SYSTRAY

_________________
es gibt leute, die sind genetisch nicht zum programmieren geschaffen.
in der regel haben diese leute die regel...
Tino
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Veteran
Beiträge: 9839
Erhaltene Danke: 45

Windows 8.1
Delphi XE4
BeitragVerfasst: Mo 14.03.05 23:25 
Titel: Re: Ich hätte da noch 'ne Frage
user profile iconChris Maslowski hat folgendes geschrieben:
Doch ich hab da noch ein Problem. [...]

Bei einer neuen Frage erstelle bitte ein neues Topic.

Gruß
Tino