开发者

How to put a C# programm (ex WPF or WF or with Mono) under desctop Icons (like a wallpaper)?

开发者 https://www.devze.com 2022-12-09 18:05 出处:网络
How to put a C# programm (ex WPF or WF) under desctop Icons (like a wallpaper)? I want my Old Good XP Active Desktop made by a some open source C# programm on my Win 7!)

How to put a C# programm (ex WPF or WF) under desctop Icons (like a wallpaper)?

  • I want my Old Good XP Active Desktop made by a some open source C# programm on my Win 7!)

  • Something like this - Fences . They have there "windows" appearing underneath icons. I do not want to manage Icons - just开发者_运维技巧 put my window under them... BTW any one knows about such operations in other OS’s (Mac etc)?

  • And I DO NOT WANT TO MANAGE ALL THE ICONS ON MY OWN LIKE bumptop


I think it is quite possible, try this:

  1. Find handle to window with the class "Progman".
  2. Create some window in your application (or, perhaps, in some separate application, you will see the purpose later) and turn off its borders.
  3. Set the parent of the newly created window to desktop handle.
  4. Set the parent of "Progman" window you have found previousely to the window you created.

Desktop will be put on a window owned by your application and it will be possible to manipulate it in the way you want (namely, put something under it).

Also, do not forget to restore desktop's parent when application owning it is closed.

Look for FindWindow, GetClassName and SetParent at http://www.pinvoke.net/


Short answer is you can't really do it (in managed C# anyway). If it's possible, you would need to use Interop, and you'd likely be calling something that Windows doesn't offer as an API.

... although... as Ole Jak mentioned, Stardock looks to be doing it somehow...

The desktop is its own contained item. The same process handles the icons and the wallpaper "behind" those icons.

You are allowed to change the wallpaper to a different image, and you used to be able to create an Active Desktop where HTML content would be displayed, but this was discontinued in Vista.

What are you actually trying to do? Maybe there's another way to achieve a similar result?


There was DreamScene for vista. You could put a video as explorer background. I dont know if you could run a C# program to output the background video.

0

精彩评论

暂无评论...
验证码 换一张
取 消