Delphi-PRAXiS

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   GUI-Design mit VCL / FireMonkey / Common Controls (https://www.delphipraxis.net/18-gui-design-mit-vcl-firemonkey-common-controls/)
-   -   Transparentes Formular Frage (https://www.delphipraxis.net/155268-transparentes-formular-frage.html)

Grolle 15. Okt 2010 13:55

Transparentes Formular Frage
 
Hallo,

ich habe ein Formular, welches transparent ist. Darauf liegt ein Image, welches im MouseDown folgendes tut:
Delphi-Quellcode:
  ReleaseCapture;
  Perform(wm_syscommand,$f012, 0);
Jetzt liegen auf dem Image 2 Buttons, die dieses Verhalten nicht erben sollen. Wie mach ich das?

Viele Grüße ...

Bummi 15. Okt 2010 14:17

AW: Transparentes Formular Frage
 
Ich habe verstanden daß die Buttons auf dem Image gemalt sind. Exemplarisch:

Delphi-Quellcode:

Function ButtonClicked(x,y:Integer):Integer;
begin
  If (x>10) and (x<30) and (y>10) and (y<20) then Result := 1
  else If (x>30) and (x<40) and (y>10) and (y<20) then Result := 2
  else Result := 0;

end;


ButtonClicked := GetButtonClicked(x,y);
if ButtonClicked=0 then
  begin
  ReleaseCapture;
  Perform(wm_syscommand,$f012, 0);
  end;

Sir Rufo 15. Okt 2010 14:21

AW: Transparentes Formular Frage
 
Dafür gibt es aber wesentlich schöner Delphi-Referenz durchsuchenPtInRect

Wenn es sich um TButtons handelt, dann erben die das aber nicht

Aphton 15. Okt 2010 15:34

AW: Transparentes Formular Frage
 
Edit: Sry, falscher Thread (damn Tabs)

Grolle 15. Okt 2010 19:22

AW: Transparentes Formular Frage
 
Hi,

es sind TButtons. Komischerweise verhalten diese sich unter XP anders als unter Win7?! (Unter Win 7 gehts)

Viele Grüße


Alle Zeitangaben in WEZ +1. Es ist jetzt 02:42 Uhr.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz