我怎么把我的自定义工具栏(DeskBand?)在任务栏上在Windows 7中获胜WPF? [英] How do I place my custom toolbar (DeskBand?) on taskbar in Windows 7 win WPF?

查看:695
本文介绍了我怎么把我的自定义工具栏(DeskBand?)在任务栏上在Windows 7中获胜WPF?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我如何将我的自定义工具栏上的任务栏在Windows 7之前的任务面板?有一种叫做Pokki流行应用程序,它做的。

我不知道我该怎么做?

How do I place my custom toolbar on taskbar in Windows 7 before tasks panel? There is a popular application called Pokki which does it. I wonder how do I do the same?

EDIT1:我需要一个100%的方式自定义工具栏(?DeskBand)的Windows 7。我不是在寻找一个引脚的应用解决方案,而是一种方式来建立能够处理它自己的消息,并显示它自己的图标定制的解决方案。 。C#的方式是极大的赞赏。

I need a 100% way to a custom toolbar (DeskBand?) for Windows 7. I'm not looking for a pin-an application solution, rather a way to build a custom solution capable of processing it's own messages and displaying it's own icons. C# way is greatly appreciated.

EDIT2:WPF的方式是极大的赞赏。

WPF way is greatly appreciated.

推荐答案

您会得到很多建议为不可以在C#中做到这一点。我不能建议,否则,你的deskband将无法正常工作的可能性是巨大的。目前的问题是CLR版本注射的问题,一个过程(如explorer.exe的)只能有一个版本加载CLR的。而当它是错误的版本你deskband将无法工作。

You'll get plenty of advice to not do this in C#. I cannot recommend otherwise, the odds that your deskband will not work are great. At issue is the CLR version injection problem, a process (like explorer.exe) can have only one version of the CLR loaded. And your deskband will not work when it is the wrong version.

有反对这个问题加入非常具体的反制措施.NET 4.0,它支持CLR在进程并排端版本的CLR。换言之,其在单个进程中加载​​多个CLR。该功能在这种特定情况下,需要在CLR,因为它是用托管代码编写一个COM服务器工作。因此,一个绝对的要求是,你写你的信息定位.NET 4.0或更高版本。

There were very specific counter-measures against this problem added in .NET 4.0, its CLR supports in-process side-by-side versions of the CLR. In other words, having more than one CLR loaded in a single process. That feature works in this specific scenario, a COM server that needs the CLR because it was written in managed code. So an absolute requirement is that you'd write your extension targeting .NET 4.0 or better.

但仍有遗留问题,最核心的原因,微软仍然没有不支持此方案的外壳扩展。有一个谁是第一位的的问题。尽管警告不这样做,有外壳扩展,在那里,使用托管代码和目标CLR版本2。如果这样的扩展被加载的的你,因为它依赖的顺序完全随机事件在注册表项,资源管理器可能会CLR 2首先加载。然后阻止制程并排端的功能无法正常工作时,CLR版本4在第一次加载它只能得出一个好的结束。

But there is still a legacy problem, and the core reason that Microsoft still does not support this scenario for shell extensions. There is a "who comes first" problem. Despite the warning not to do this, there are shell extensions out there that use managed code and target CLR version 2. If such an extension gets loaded before yours, an entirely random event since it depends on the order of keys in the registry, Explorer might get CLR 2 loaded first. Which then prevents the inprocess side-by-side feature from working, it can only come to a good end when CLR version 4 is loaded first.

这是完全undiagnosable,当分机无法加载Explorer不吱。和不固定的普通用户来说,你不能指望他晦涩的注册表项来鼓捣。

This is utterly undiagnosable, Explorer doesn't squeak when an extension can't be loaded. And unfixable to the average user, you cannot expect him to tinker with obscure registry keys.

这是要花费大量的时间这个问题之前,完全可以开除。实际上,Windows需要停止之前,.NET 4支持.NET版本有保证。做了很多的时间,十年或更长时间。

It is going to take a lot of time before this problem can be dismissed completely. Realistically, Windows needs to stop supporting .NET versions prior to .NET 4 to have a guarantee. Make that a lot of time, a decade or more.

好了,谨慎的风,你可以把它在C#中工作,如果你不担心抽查不合格。您接下来会淹没在非常模糊的COM接口的详细信息,幸存的他们需要黑皮带技能知道如何正确申报[ComImport】界面。这不是你应该自己解决,它已被他人完成。我没有推荐产品的习惯,但不能跳过推荐 EZShellExtensions ,库专门用于帮助在C#编写shell扩展。对于deskbands的支持是其做广告的特点之一。使用试用版,这个鼓捣来看看你能不能把这个好下场。

Well, caution to the wind, you can make it work in C# if you don't worry about random failure. You'll next get buried in very obscure COM interface details, surviving them requires black-belt skills with knowing how to properly declare a [ComImport] interface. This is not something you ought to tackle yourself, it has been done by others. I'm not in the habit of recommending products, but can't skip recommending EZShellExtensions, a library specifically designed to help writing shell extensions in C#. Support for deskbands is one of its advertized features. Use the trial version to tinker with this to see if you can bring this to a good end.

这篇关于我怎么把我的自定义工具栏(DeskBand?)在任务栏上在Windows 7中获胜WPF?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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