Autor Beitrag
Stefan-W
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 475

Win 7 SP1
D2005 PE
BeitragVerfasst: Do 30.03.06 20:55 
Hi,

ich steh mal wieder vor einem Problemn wo ich nach stundenlangem Suchen und Testen nicht mehr weiter kommen.

Und zwar: ich will ein Form 100% Transparent machen, ein Image drauf legen
und nun soll, wenn sich der Hintergrund hinter dem Form ändert (zB. durch ein anderes Fenster mit vllt einem ProgressBar) dies auch sichtbar werden.

mit dem Befehl ( Form1.Brush.Style:=bsClear; ) gehts jedenfalls nicht. So bekomme ich zwar das Form schön Transparent jedoch wird eine änderung des Hintergrundes nicht sichbar.

ich hoffe einer von euch hat eine Idee wie man das lösen kann.

Tschau Stefan
thkerkmann
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 20

Windows 7
Delphi 2010 Professional
BeitragVerfasst: Do 30.03.06 21:37 
Hi,

ich glaube nicht, dass das geht. Ich denke das Form "verdeckt" mit seinem Bereich trotzdem den Hintergrund - glaubt jedenfalls Windows - und veranlasst somit kein Neuzeichnen des verdeckten Fensters.
Das einzige was beim Aufbauen deines Forms geschieht ist, das der Hintergrund in den Formbereich kopiert wird.

Eventuell könntest Du versuchen dein transparentes Form ständig (Timer) etwas zu verschieben. Obwohl auch das nur zu einem Neuzeichnen der freigewordenen paar Pixel führen würde.... :gruebel:

Hm....

Mal drüber schlafen..

Gruss

Thomas.
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: Do 30.03.06 21:40 
WindowRegions (gabs hier im Forum FAQ was)
oder halt TForm.TransparentColor nutzen (ab D6)
sonst mal danach googlen, geht auch über die WinAPI (weiß aba atm net den Befehl)

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)
Stefan-W Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 475

Win 7 SP1
D2005 PE
BeitragVerfasst: Do 30.03.06 21:48 
mit WindowRegions also zuschneiden ist die Sache leider nicht abgetan. damit könnte ich höchstens den bereich den das betrifft verkleinern.

ich habs bis jetzt wie folgt versucht:

- Form ausblenden
- screenshot machen
- Screenshot auf form malen
- Form einblenden

klappt aber nicht so ganz
Stefan-W Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 475

Win 7 SP1
D2005 PE
BeitragVerfasst: Fr 31.03.06 12:37 
eine Lösung zu dem problem gibts nun hier.

da muss nur noch geklährt werden wie man da ne andere kompo davor bekommt, dass man diese nutzen kann