如何使Windows 8桌面应用程序显示在Metro UI(例如任务管理器)中? [英] How to make Windows 8 desktop apps shown in Metro UI (like Task Manager)?

查看:112
本文介绍了如何使Windows 8桌面应用程序显示在Metro UI(例如任务管理器)中?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

最近我注意到Windows 8任务管理器可以在Metro UI中显示.

Recently I have noticed that Windows 8 Task Manager can be shown in Metro UI.

要求是必须始终将其设置为顶部(通过选项->始终位于顶部"菜单).

The requirement is that you must set it always on top (through "Options -> Always on top" menu).

始终设置在最上方之后,可以在桌面中启动任务管理器,切换到Metro,可以看到任务管理器显示在Metro中.

After setting always on top, you can launch Task Manager in Desktop, switch to Metro, you can see that Task Manager is shown in Metro.

或者您可以直接在Metro中启动任务管理器(通过按Ctrl + Shift + Esc或Ctrl + Alt + Delete).

Or you can directly launch Task Manager in Metro (by pressing Ctrl+Shift+Esc or Ctrl+Alt+Delete).

我只是想知道如何在其他应用程序中实现这一目标?如果其他桌面应用程序始终排在最前面,则没有这种行为.

I just wanna know how to achieve this in other apps? Other desktop apps don't have this behavior if they are always on top.

Windows 8 Task Manager是一个特殊的应用程序吗?也许是桌面应用程序和Metro应用程序的混合体? 还是有一些隐藏的Windows API可以实现这一目标?

Is Windows 8 Task Manager is a special app? Maybe it is a mixture of Desktop app and Metro app? Or there are some hidden Windows API that can achieve this?

我想知道如何执行此操作的原因是我想编写一个时钟小工具,该小工具将始终在Metro(在屏幕的一角)中显示.因此,当我想知道时间的时候,不必调出Windows Charm(通过按Win + C).

The reason why I want to know how to do this is that I want to write a clock gadget that will always shown in Metro (in a corner of the screen). So I don't have to bring up Windows Charm (by pressing Win+C) when I want to know the time.

推荐答案

有一种方法可以通过使用清单文件并执行一些操作来实现:)

There is a way to do that by using a manifest file and doing some stuff :)

如何?

  1. 准备项目:

  1. Prepare the project:

  • 使用level=highestAvailableuiAccess=true
  • 将清单文件添加到您的UI项目
  • mainWindow应该具有两个属性:启用ShowInTaskbarTopMost.
  • Add a manifest file to your UI Project with level=highestAvailable and uiAccess=true
  • The mainWindow should have the two properties : ShowInTaskbar and TopMost enabled.

对APP进行签名: 建立您的专案.如果您此时尝试运行该应用程序,它将无法正常工作,因为您需要对其进行签名.参见此链接有关如何操作.

Signing the APP: Build your project. If you try to run the application at this point, it won't work because you need to sign it. See this link for how to do it.

移动到受信任的位置: 您需要将应用程序复制到受信任的位置: C:\program files' 'C:\program files x86' or 'C:/Windows/system32

Moving to a trusted location: You need to copy your application in a trusted location: C:\program files' 'C:\program files x86' or 'C:/Windows/system32

这篇关于如何使Windows 8桌面应用程序显示在Metro UI(例如任务管理器)中?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆