开发者

How to detect if an application window is set to 'always on top' / 'top most' (that is not part of my application)?

开发者 https://www.devze.com 2022-12-19 01:40 出处:网络
I am enumerating through all visible application windows on a system and I want to determine which ones are set to \'always on top\' / \'top most\'.

I am enumerating through all visible application windows on a system and I want to determine which ones are set to 'always on top' / 'top most'.

My application needs to determine this as it positions various third party applications on a large monitor for fast data entry.

I'm happy with a P开发者_StackOverflow/Invoke solution.


You'll need to P/Invoke GetWindowLongPtr() to get the extended style of the window (GWL_EXSTYLE = -20) and check if the WS_EX_TOPMOST style is turned on (0x08). Visit pinvoke.net for the declarations.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号