How to prevent an app from being pinned in Windows 7?

前端 未结 3 946
逝去的感伤
逝去的感伤 2021-02-10 03:48

I am trying to prevent the user from pinning my .NET app to the taskbar. I\'ve found some code on the Old New Thing that does just that. However, it is in C++.



        
3条回答
  •  天涯浪人
    2021-02-10 04:28

    You can download the Windows API Code Pack which has the necessary p/invoke calls you need to translate the code in your post to C#.

    Either use the library in whole or find the specific calls and definitions you require (search it for SHGetPropertyStoreForWindow and then its other dependencies).

提交回复
热议问题