我们尝试在Windows 8上运行相同的应用程序,并注意它在桌面模式下按预期工作,但没有任何内容覆盖开始菜单和其他metro应用程序.@H_403_2@
http://blogs.microsoft.co.il/blogs/pavely/archive/2012/05/16/windows-8-topmost-vs-topmost.aspx@H_403_2@
The topmost window is also affected by the accessibility settings. If you want a window on top of Metro,you need it to declare accessibility. Here are the key points:@H_403_2@
The application must demand
uiAccess
(app.manifest)@H_403_2@ @H_301_22@The application must assert “topmost” window positioning (either in Win32/
SetWindowPos
or WinForms/WPF’sTopmost
property,programmatically or otherwise)@H_403_2@ @H_301_22@Without making changes to the group policy setting,it must be installed to some trusted location [
C:\Windows
,C:\Program Files
,C:\Program Files (x86)
].@H_403_2@@H_301_22@
If you want to be able to run it out of an arbitrary location,you must disable the security setting: “User Account Control: Only elevate UIAccess applications that are installed in secure locations”.@H_403_2@ @H_301_22@
This is the same as setting
HKLM\Software\Microsoft\Windows\CurrentVersion\Policies\System\ValidateAdminCodeSignatures
to0
@H_403_2@ @H_301_22@Said application cannot be run in the debugger@H_403_2@ @H_301_22@
If it’s a .NET application:@H_403_2@
@H_301_22@
The manifest must be embedded in a post-build step@H_403_2@ @H_301_22@
The application must have “delayed signing” (meaning it cannot be ran from the built-in debugger,although you can build and attach – this is what Microsoft does)@H_403_2@ @H_301_22@
The application must be signed with a trusted certificate.@H_403_2@ @H_301_22@
Said trusted certificate must be installed to the Trusted Root Certificate Authority (this is important! It must not just simply installed)@H_403_2@ @H_301_22@