Autor Beitrag
GSE
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 740

Win 2k, Win XP Pro
D5 Prof, D6 Ent, D2k5 PE
BeitragVerfasst: So 23.02.03 15:20 
Hi Leuts, :wave:

Meine Frage:
Wie kann ich die Breite des Taskbareintrages (ihr wisst schon: der
Button(?) in der Taskleiste) meines Programm´s rausfinden?

Hat jemand eine Idee oder weiß es jemand? Wäre dankbar!
Danke schon im Voraus.

mfg
GSE

_________________
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs
and the universe trying to produce bigger and better idiots. So far, the universe is winning. (Richard Cook)
Andreas Pfau
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 997



BeitragVerfasst: Fr 28.02.03 22:02 
Also... ich habe das probiert:
ausblenden Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
procedure TForm1.Button1Click(Sender: TObject);
var
  R: TRect;
  W: Cardinal;
begin
  W := GetWindow(Handle, Gw_Owner);
  GetWindowRect(W, R);
  ShowMessageFmt('%d, %d, %d, %d', [R.Left, R.Top, R.Right, R.Bottom]);
end;


Klappt nur nicht. Das Fenster-Handle ist das des Buttons. Aber die Maße sind falsch. Aber villeicht kannst du ja was damit anfangen, so als "Denkanstoß"...