Windows aero peek API

前端之家收集整理的这篇文章主要介绍了Windows aero peek API前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
我正在尝试使用API​​进行航空偷看.经过大量的挖掘和搜索,我偶然发现了这段代码
[DllImport("dwmapi.dll",EntryPoint = "#113",SetLastError = true)]
    internal static extern uint DwmpActivateLivePreview(uint,uint,uint );

但我不能让它工作..我不知道参数是什么..我尝试了一些API拦截工具,但没有成功.如何才能发现如何正确调用此API?

我最终解决了我的自我.我在我的网站上发布了一篇关于此的文章
http://www.jesconsultancy.nl/tips-and-tricks/aero-apis.html.
不幸的是,这是在荷兰语,所以这里有点解释:
[DllImport("dwmapi.dll",SetLastError = true)]
 internal static extern uint DwmpActivateLivePreview(uint switch,IntPtr hWnd,IntPtr c,uint d);

 DwmpActivateLivePreview(1,Handle,topmostWindowHandle,1);//activate
 DwmpActivateLivePreview(0,1);//deactivate

第一个参数用于激活/停用Aero Peek功能.第二个参数是Aero peek关注的句柄.另外两个我尚未确定的.

编辑:
在更多地讨论这个API后,我想出了第3个参数.在设置表单的TopMost属性时,表单有时会显示在aero peek效果的下方.如果将句柄传递给需要作为第3个参数的peek效果顶部的表单,并且表单的TopMost属性设置为true,则表单将位于查看效果之上.

您可以从Aero Peek效果中排除窗口.这在这里描述:http://huddledmasses.org/fun-with-pinvoke-and-aero-peek/

原文链接:https://www.f2er.com/windows/365300.html

猜你在找的Windows相关文章