Windows 8 Layered Windows Over Metro Apps

后端 未结 3 1821
梦如初夏
梦如初夏 2020-12-29 14:35

I have an app that runs on Windows 7 using Microsoft\'s Layered Window http://msdn.microsoft.com/en-us/library/ms997507.aspx. This app is setup to have a 30% opacity, it\'s

3条回答
  •  生来不讨喜
    2020-12-29 15:07

    Yes, it is possible. Please take a look at this page:

    http://blogs.microsoft.co.il/blogs/pavely/archive/2012/05/16/windows-8-topmost-vs-topmost.aspx

    Specifically the second post in the comments section:

    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:

    1. The application must demand uiAccess (app.manifest)

    2. The application must assert “topmost” window positioning (either in Win32/SetWindowPos or WinForms/WPF’s Topmost property, programmatically or otherwise)

    3. 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)].

      • 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”.

      • This is the same as setting HKLM\Software\Microsoft\Windows\CurrentVersion\Policies\System\ValidateAdminCodeSignatures to 0

    4. Said application cannot be run in the debugger

    5. If it’s a .NET application:

      • The manifest must be embedded in a post-build step

      • 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)

    6. The application must be signed with a trusted certificate.

    7. Said trusted certificate must be installed to the Trusted Root Certificate Authority (this is important! It must not just simply installed)

提交回复
热议问题