我试过这个方法:http://www.codeproject.com/Articles/545781/NET-Shell-Extensions-Shell-Icon-Overlay-Handlers
Option Strict On
Option Explicit On
Imports System.Runtime.InteropServices
Imports SharpShell.Interop
<ComVisible(True)>
Public Class IconOverlayYeah : Inherits SharpShell.SharpIconOverlayHandler.SharpIconOverlayHandler
Protected Overrides Function CanShowOverlay(path As String, attributes As FILE_ATTRIBUTE) As Boolean
Return True
End Function
Protected Overrides Function GetOverlayIcon() As System.Drawing.Icon
Return New System.Drawing.Icon("C:\Users\user\Desktop\icon.ico")
End Function
Protected Overrides Function GetPriority() As Integer
Return 90
End Function
End Class用regasm.exe注册了结果动态链接库(用regedit.exe可见),但不幸的是,我的图标不会出现在资源管理器或任何地方。我只有6个覆盖注册,并尝试了很多解决办法,我发现通过谷歌。但是我不能让它工作。你能帮帮我吗?
发布于 2016-04-21 20:28:17
regasm.exe将仅注册程序集。但根据How to Register Icon Overlay Handlers的说法
除了正常的组件对象模型(COM)注册外,还必须完成以下步骤才能注册图标覆盖处理程序。步骤1:在该key下创建一个为处理程序命名的子键
HKEY_LOCAL_MACHINE
软件
微软
视窗
CurrentVersion
资源管理器
ShellIconOverlayIdentifiers
步骤2:将子键的默认值设置为对象的>类标识符(CLSID)GUID的字符串形式
您可以从SharpShell使用srm.exe或ServerManager.exe (您可以从here下载它们。
此外,在注册图标覆盖处理程序后,请尝试重新启动浏览器。
希望这能有所帮助。
https://stackoverflow.com/questions/36565835
复制相似问题