问题
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