How to use Windows 7 features in my simple .net application without any new API?

感情迁移 提交于 2019-12-24 12:15:58

问题


I want to use windows 7 features like icon overlay, and thumbnail tasks but my question is that can i do it without using any other API on just my plain .net 3.5. i recently enabled jumplists on an application in my c#.net 3.5 using the Shell routine so can something like that be done for icon overlay and other windows 7 taskbar features.

And can old application like notepad which i am sure was made years ago use these new feaures?


回答1:


I guess it depends on the meaning of "use". You get jumplists for free if you use the Common Files Dialog. If your app is WPF or MFC, you get some Windows 7 stuff in the latest version of those libraries (not 3.5). Failing that, you will need to either ask Windows directly (use an API) or use a library that isn't part of .NET 3.5 that will ask Windows for you. I recommend you use the Code Pack. One line of code for an overlay icon, for example. It also has non-visual Windows 7 features like Restart and Recovery, Power Awareness (.NET events when the machine goes on battery etc). It was last updated November 18th 2009 and I am expecting a new release any day now.




回答2:


If you really don't want to use .NET wrapped taskbar functionalities, you can try this link that calls overlay via PInvoke. For other W7 taskbar options you can check on the same site.

Anyway I suggest you to use the .NET managed API



来源:https://stackoverflow.com/questions/3510002/how-to-use-windows-7-features-in-my-simple-net-application-without-any-new-api

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!