Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/283.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/wordpress/11.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# IE9工具栏按钮的自定义图标_C#_Internet Explorer_Bho_Browser Extension_Protected Mode - Fatal编程技术网

C# IE9工具栏按钮的自定义图标

C# IE9工具栏按钮的自定义图标,c#,internet-explorer,bho,browser-extension,protected-mode,C#,Internet Explorer,Bho,Browser Extension,Protected Mode,我为IE9做了一个扩展,添加了一个工具栏按钮 注册如下所示: RegistryKey registryKey = Registry.LocalMachine.OpenSubKey(RegCmd, true); if (registryKey == null) registryKey = Registry.LocalMachine.CreateSubKey(RegCmd); RegistryKey key = registryKey.OpenSubKey(guid); if (key ==

我为IE9做了一个扩展,添加了一个工具栏按钮

注册如下所示:

RegistryKey registryKey = Registry.LocalMachine.OpenSubKey(RegCmd, true);
if (registryKey == null)
   registryKey = Registry.LocalMachine.CreateSubKey(RegCmd);
RegistryKey key = registryKey.OpenSubKey(guid);
if (key == null)
  key = registryKey.CreateSubKey(guid);
key.SetValue("ButtonText", "My Button");
key.SetValue("CLSID", "{1FBA04EE-3024-11d2-8F1F-0000F87ABD16}");
key.SetValue("ClsidExtension", guid);
key.SetValue("Icon", "c:\myicon.ico");
key.SetValue("HotIcon", "c:\myicon.ico");
key.SetValue("Default Visible", "Yes");
key.SetValue("MenuText", "My Button");
key.SetValue("ToolTip", "My Button");
//key.SetValue("KeyPath", "no"); 
registryKey.Close();
key.Close();
问题是-图标在文件系统中被引用为文件,而不是URL。IE Gallery以.dll而不是.msi的形式分发插件,因此我没有机会将.ico放入本地文件系统


如何使按钮使用我的图标?

您应该能够将您的图标添加到DLL中,并使用
mydll.DLL,0
或类似于图标的东西。

如何“将我的图标添加到我的DLL中”,以便我可以使用“mydll.DLL,0”引用它?@MSC,就此提出一个问题。