Delphi-PRAXiS
Seite 12 von 12   « Erste     2101112   

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   Software-Projekte der Mitglieder (https://www.delphipraxis.net/26-software-projekte-der-mitglieder/)
-   -   CPU-Auslastung (https://www.delphipraxis.net/7686-cpu-auslastung.html)

Tommy1988 30. Apr 2007 17:28

Re: CPU-Auslastung
 
Zitat:

ahh mist ich habe jetzt auch nicht die Taskleiste beachtet, die musst du natürlich hier noch beachten:
Code:
if ((Form1.Top + Form1.Height) > (Screen.Height {- taskleistenhöhe...})) then
form1.Top := Screen.Height - Form1.Height;
Wie ermittele ich denn die Taskleistenhöhe?

Edit: Problem gelöst!

Funktion:
Delphi-Quellcode:
function GetTaskbarHeight: integer;
var
  SysTray: Windows.HWND;
  Rect: TRect;
begin
  Result := -1;
  SysTray := FindWindow('Shell_TrayWnd', nil);
  If SysTray <> INVALID_HANDLE_VALUE then begin
    If GetWindowRect(SysTray, Rect) then begin
      Result := Screen.Height - Rect.Top;
    end;
  end;
end;
Restliches:
Delphi-Quellcode:
hoehe := screen.Monitors[0].Height;
breite := screen.Monitors[0].Width;

Form3.Top := hoehe-50-StrToInt(Label17.Caption); // Form3 ist 50 pixel hoch
Form3.Left := breite-272;                       // und 272 pixel breit
Form3.Show;


Alle Zeitangaben in WEZ +1. Es ist jetzt 16:36 Uhr.
Seite 12 von 12   « Erste     2101112   

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-2025 by Thomas Breitkreuz