8

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 always on top, and it is transparent to events (ie: it forwards all events to windows underneath it). You can think of it as a "screen" you are looking at your desktop through. It is currently being used to be an omnipresent feedback layer for our users.

We've tried running the same app on Windows 8, and notice it works as expected in desktop mode, but nothing overlays the start menu and other metro apps.

Does anyone know if there is an equivalent always on top window mode that works across metro apps and the start menu in Windows 8?

CRABOLO
  • 8,605
  • 39
  • 41
  • 68
Eric Webb
  • 335
  • 2
  • 11
  • 1
    Not possible, Metro apps run on their own protected desktop. – Hans Passant Jun 27 '12 at 19:25
  • Metro is incredibly nerfed compared to the traditional desktop; interaction between the two is nigh impossible, nor is it desirable. – Luke Jun 27 '12 at 19:54
  • Thanks all. Another data point, the windows on-screen-keyboard does seems to be onmi-present (even over start menu and other metro apps). Admittedly, it can have special perms in windows... – Eric Webb Jun 27 '12 at 20:38
  • Accessibility tools have special privileges. – Raymond Chen Nov 19 '12 at 16:16
  • @RaymondChen Are you referring to all accessibility tools (declaring themselves as such in the manifest somehow), or do you mean built-in Windows accessibility tools (meaning that 3rd party developers can't get the same access)? – Roman Starkov Feb 04 '13 at 05:50
  • @romkyns As noted in the accepted answer, third party application can request UI access privilege. – Raymond Chen Feb 04 '13 at 14:15

3 Answers3

13

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)

Timwi
  • 65,159
  • 33
  • 165
  • 230
Lai Xue
  • 1,523
  • 1
  • 15
  • 17
1

Run the windows speech recognition. Its a top most window which floats over start menu, desktop etc. So its possible for sure. I am working on a touch simulator for Windows 8 and needed to implement this feature.

Here are the steps to achieve this:

http://www.pixytech.com/rajnish/2013/05/windows-8-topmost-window/

Brad Larson
  • 170,088
  • 45
  • 397
  • 571
-3

I am almost positive that you can't have any other app overlaying a Metro app. The new Metro environment is meant to run single, full-screen apps (or two, but only if snapped to the side). Further, allowing something to act as a man-in-the-middle is a bit dangerous, since they could capture all sorts of sensitive user data.

That being said, if you can set the "always on top" property of a window, it might stay put over the Start menu and various Metro apps. I know it works with Task Manager, but I have never tried with an arbitrary app. I do not know that it would work well for Metro apps, however, due to their events being different than old-timey winform apps. You'd have to see if your "screen" allows touch events to pass through.

Andy_Vulhop
  • 4,699
  • 3
  • 25
  • 34