在桌面背景上绘图作为墙纸替换(Windows / C#) [英] Drawing on the desktop background as wallpaper replacement (Windows/C#)

查看:91
本文介绍了在桌面背景上绘图作为墙纸替换(Windows / C#)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试制作一个需要在桌面上绘制的应用程序,该应用程序位于图标的后面,以便看起来可以代替桌面墙纸。我找到了一些解决方案,但是大多数解决方案都效果不佳(很多闪烁)。一种解决方案似乎正是我要寻找的,但我真的不明白。我已经使用较高级别的图形库或仅使用Windows Forms完成了大部分C#应用程序,并且使用了某些C ++,但仅在非Windows平台上进行过。

I'm trying to make an application that needs to draw on the desktop, behind the icons so it appears to replace the desktop wallpaper. I've found a few solutions to this, but most of them didn't work very well (lots of flickering). One solution seems to be what I'm looking for, but I don't really get it. I've done mostly C# applications using either higher-level graphics libraries or just Windows Forms, and some C++ but only on non-Windows platforms.

如果有人可以翻译 它对我来说还是为我提供替代解决方案,将不胜感激!

If anyone could "translate" it for me or provide me with an alternative solution, it would be much appreciated!

推荐答案

我从未找到我想要的解决方案,但这是最好的(唯一?)替代方法:

I never found the solution I wanted, but here are the best (only?) alternatives:


  • 绘制到 SysListView32窗口(ProgMan-> SHELLDLL_DefView- > SysListView32)。这将画在桌面图标的后面,但在使用动画时会闪烁。如何:链接(您必须在.NET中使用互操作)。

  • Draw to the "SysListView32" window (ProgMan -> SHELLDLL_DefView -> SysListView32). This will draw behind the desktop icons, but will flicker when animation is used. How to: Link (you'll have to use interop in .NET).

使用DirectDraw叠加层。您将桌面颜色设置为某种晦涩的颜色,所有具有该颜色的内容都将替换为叠加层上的颜色。在我的问题和VLC墙纸模式下的示例中使用了此方法。但是,这与Aero不兼容。如何:链接(我想您可以在.NET中使用Managed DirectX?)。

Use DirectDraw overlays. You set the desktop color to a certain obscure color and everything with that color will be replaced with what's on the overlay. This is used in the example in my question and in the VLC wallpaper mode. However, this is incompatible with Aero. How to: Link (I guess you could use Managed DirectX in .NET?).

这篇关于在桌面背景上绘图作为墙纸替换(Windows / C#)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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