How to make a click- and see-through 'always on top'-window [duplicate]

南楼画角 提交于 2019-12-12 14:20:58

问题


I want to display an semi-transparent always-on-top window with some information, but I do not want this window to take input or receive focus. All mouse-clicks should go to the underlaying window.

I remember seeing this in a shell-replacement application years back, but I can't remeber witch.

Any Ideas how to achieve this effect with delphi or c#?

Update:

I can't quite get the proposed solution to work with delphi. Returning HTTRANSPARENT for the NCHITTEST-message will stop all mousemessages reaching the form, but it want pass it down to the next window in z-order. Is this method ment to work across processes, or is it only ment to work on childelements of a spesific window?

If I set the ExStyle flag WS_EX_TRANSPARENT, though, all mouseclicks will travel through into the next window, but I will not get the NCHITTEST-message at all, and will not be able to control where the windows should be click-through or not...


回答1:


This StackOverflow thread should answer your question hopefully.



来源:https://stackoverflow.com/questions/527933/how-to-make-a-click-and-see-through-always-on-top-window

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!