Autor Beitrag
rizor
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 209

WIN XP
Delphi 2005 PE, Visual C++
BeitragVerfasst: Do 27.09.07 10:05 
Hi

kann man die Größe der Taskbar abfragen?

cu
Rizor
ZeitGeist87
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 1593
Erhaltene Danke: 20

Win95-Win10
Delphi 10 Seattle, Rad Studio 2007, Delphi 7 Prof., C++, WSH, Turbo Pascal, PHP, Delphi X2
BeitragVerfasst: Do 27.09.07 10:11 
Hallo!

Ja, kann man.

//Edit: du willst sicher wissen wie ;-)

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
procedure TForm1.Button1Click(Sender: TObject);
var
  H: HWnd;
  Rect: TRect;
begin
  H:= FindWindow('Shell_TrayWnd', nil);
  if H<>0 then
  begin
    GetWindowRect(H, Rect);
 
    Label1.Caption:= 'Left: ' + IntToStr(Rect.Left);
    Label2.Caption:= 'Right: ' + IntToStr(Rect.Right);
    Label3.Caption:= 'Top: ' + IntToStr(Rect.Top);
    Label4.Caption:= 'Bottom: ' + IntToStr(Rect.Bottom);
  end;
end;


LG
Stefan

_________________
Wer Provokationen, Ironie, Sarkasmus oder Zynismus herauslesen kann soll sie ignorieren um den Inhalt meiner Beiträge ungetrübt erfassen zu können.
rizor Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 209

WIN XP
Delphi 2005 PE, Visual C++
BeitragVerfasst: Do 27.09.07 10:17 
Super.
Danke
passiv
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 270

WIN XP Professional
Delphi 7 Enterprise, Java (Eclipse), Python 2.5, Django 1.1
BeitragVerfasst: Do 27.09.07 10:57 
das ginge doch auch mit screen.Height und screen.clientHeight und da raussubtrahieren

_________________
Die Probleme, die es in der Welt gibt, sind nicht mit der gleichen Denkweise zu lösen, die sie erzeugt hat.
Albert Einstein
ZeitGeist87
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 1593
Erhaltene Danke: 20

Win95-Win10
Delphi 10 Seattle, Rad Studio 2007, Delphi 7 Prof., C++, WSH, Turbo Pascal, PHP, Delphi X2
BeitragVerfasst: Do 27.09.07 10:59 
echt?
auf die lösung bin ich gespannt ;-)

_________________
Wer Provokationen, Ironie, Sarkasmus oder Zynismus herauslesen kann soll sie ignorieren um den Inhalt meiner Beiträge ungetrübt erfassen zu können.
matze
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 4613
Erhaltene Danke: 24

XP home, prof
Delphi 2009 Prof,
BeitragVerfasst: Do 27.09.07 12:49 
user profile iconpassiv hat folgendes geschrieben:
das ginge doch auch mit screen.Height und screen.clientHeight und da raussubtrahieren
So bekommt man aber nicht zwangläufig die Höhe der Taskbar. Wenn nämlich z.b. ICQ am Rand des Bildschirms "angedockt" ist, dann zählt das da auch mir rein.

_________________
In the beginning was the word.
And the word was content-type: text/plain.
ZeitGeist87
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 1593
Erhaltene Danke: 20

Win95-Win10
Delphi 10 Seattle, Rad Studio 2007, Delphi 7 Prof., C++, WSH, Turbo Pascal, PHP, Delphi X2
BeitragVerfasst: Do 27.09.07 12:59 
Außerdem..ich hab meine Taskleiste manchmal oben oder auf der linken Seite ;-)

_________________
Wer Provokationen, Ironie, Sarkasmus oder Zynismus herauslesen kann soll sie ignorieren um den Inhalt meiner Beiträge ungetrübt erfassen zu können.
matze
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 4613
Erhaltene Danke: 24

XP home, prof
Delphi 2009 Prof,
BeitragVerfasst: Do 27.09.07 13:36 
Richtig. Da muss man aber bei jedem Code unterscheiden, da bei einer Taskleite an der Seite, deren Höhe immer die Höhe des Bildschirms ist.

_________________
In the beginning was the word.
And the word was content-type: text/plain.
passiv
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 270

WIN XP Professional
Delphi 7 Enterprise, Java (Eclipse), Python 2.5, Django 1.1
BeitragVerfasst: Fr 28.09.07 11:50 
dafür gibts dann screen.top und screen.left ;-)

_________________
Die Probleme, die es in der Welt gibt, sind nicht mit der gleichen Denkweise zu lösen, die sie erzeugt hat.
Albert Einstein
ZeitGeist87
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 1593
Erhaltene Danke: 20

Win95-Win10
Delphi 10 Seattle, Rad Studio 2007, Delphi 7 Prof., C++, WSH, Turbo Pascal, PHP, Delphi X2
BeitragVerfasst: Fr 28.09.07 11:57 
user profile iconpassiv hat folgendes geschrieben:
dafür gibts dann screen.top und screen.left ;-)


Screen bezieht sich aber auf die gesamte Bildschirmhöhe und -breite ;-)

Zitat:
Die Eigenschaft Width gibt das horizontale Maß des Bildschirms in Pixel an.

Delphi-Syntax:

property Width: Integer;

C++ Syntax:

__property int Width = {read=GetWidth, nodefault};

Beschreibung

Mit Width können Sie die Breite des Benutzerbildschirms in Pixel ermitteln. Die Größe bzw. die Position von Objekten kann dann so eingestellt werden, dass sie auf dem Bildschirm Platz haben und dieser nicht unübersichtlich wird.


Damit kannst du gar nix anfangen.

LG
Stefan

_________________
Wer Provokationen, Ironie, Sarkasmus oder Zynismus herauslesen kann soll sie ignorieren um den Inhalt meiner Beiträge ungetrübt erfassen zu können.
passiv
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 270

WIN XP Professional
Delphi 7 Enterprise, Java (Eclipse), Python 2.5, Django 1.1
BeitragVerfasst: Fr 28.09.07 12:02 
maaaann ...
na gut so lernt man jeden tag was neues :D

_________________
Die Probleme, die es in der Welt gibt, sind nicht mit der gleichen Denkweise zu lösen, die sie erzeugt hat.
Albert Einstein