inspiriert von diesem Thread, in dem Xaby nach einem nicht anklickbaren "Overlay-Fenster" fragte, hab ich mich mal drangesetzt und mal ausbaldowert ob und wie soetwas eventuell zu realisieren ist.
Und ... isch hab's doch tatsächlich hinbekommen.

Bei dem "nicht anklickbaren Fenster" handelt es sich also um ein Fenster im sogenannten "layered & transparency Mode", das zwar auf dem Desktop angezeigt wird, jedoch sämtliche Events zu dem dahinter liegenden Fenster durchlässt.
Sowas hätte ich zwar schon ein paar mal gut gebrauchen können, wusste bisher aber garnicht, dass sowas überhaupt geht

Nunja ... habs wie gesagt hinbekommen und das ganze dann noch zusammen mit ein paar anderen Fenster-Spezialitäten (die ich ab und zu mal brauche) in eine Include gepackt und 'ne kleine Lib draus gemacht.
Bis auf den "click-through" Modus ist nicht wirklich neues dabei (nur bekannte Spielereien wie "Hide from TaskBar" und "Window-Transparency"), aber halt Dinge, die man ab und zu braucht und nach denen halt hier auch immer mal wieder (meist von PB-Neulingen) gefragt wird.
Ich hab mal 3 Files auf meinen WebSpace hochgeladen:
- die eigentliche Lib (als .pbi umgesetzt - Doku ist im Source)
- ein ausführbares Demo-Programm um sich mal schnell die Auswirkungen der Funktionen anschauen zu können.
- sowie den Source des Demo-Programms.
- alles zusammen gibt's (dank Thomas


Im Demo-Programm (Bild oben) kann man z.B. sehr schön sehen, dass man das Browserfenster im Hintergrund DURCH das darüberliegende Fenster bedienen kann (nachdem man den "Click-Through"-Modus aktiviert hat).
Eine nähere Beschreibung des ganzen spare ich mir jetzt mal hier, da alles Nötige eigentlich im Source zu finden sein sollte.
Daher hier nur mal eine kleine Übersicht:
[color=#0000FF]WinFX_ClickThrough(WinNr, State = #True)[/color] hat geschrieben:turns the window into "click-through" Mode
In the "click-through" Mode all Mouse-Events (mouse-movement, clicks, hoover, ...) will go right through the Window to the window underneath.
That means, that the window will not receive any mouse-events from now on.
So keep that in mind, when you turn a window in "click-through" Mode and include a facility to close the window and/or react on userinput, rather than by Window-Events.
Note: For this effect, the window will be turned into "layered Mode".
For more details and limitations on that, see "additional Infos" in the "File description Header" above.
[color=#0000FF]WinFX_HideFromTaskBar(WinNr, State = #True, AutoUnHide = #True)[/color] hat geschrieben:Hides a window from the Taskbar, or brings it back on.
[color=#0000FF]WinFX_Transparency(WinNr, Level, SkinningColor = #WinFX_NoSkinning)[/color] hat geschrieben:Turns on the transparency effect for a window and sets its opacity to the given "Level".
If you set the "SkinningColor", this Color will be used to set an AlphaKey on that window, so it will be transparent on all Pixels which will have the given Color.
Note: For this effect, the window will be turned into "layered Mode".
For more details and limitations on that, see "additional Infos" in the "File description Header" above.
Wie man sieht - im Grunde also nicht wirklich viel Neues (bis auf den "Click-Through"-Effekt), aber vielleicht kann der eine oder andere von Euch das ja mal gebrauchen.[color=#0000FF]WinFX_TurnOffLayer(WinNr)[/color] hat geschrieben:Turns off the "layered Mode" of the window and switches it back to "normal" mode.
This turns off any WinFX-Effect that will need the window to be in "layered Mode".
The following functions are affected by this: WinFX_ClickThrough() & WinFX_Transparency()
Note: For more informations about the "layered-Mode", see "additional Infos" in the "File description Header" above.

Greetz and have fun, PL.
[Edit]: Link zum Zip-Archiv hinzugefügt.
[Edit2]: Neue Version online -> Window-Skinning Option bei WinFX_Transparency() hinzugefügt und Kommentare oben entsprechend angepasst.