Question

How to create an Internet Explorer addon with .net. All I need is a just a menu under right click context menu.

.net is a must.

Edit: What I am trying to do is add a context menu to IE.

Était-ce utile?

La solution 3

I found a good example explaining how to create a context menu with C#

http://www.codeproject.com/KB/menus/IE_Context_Menu_Installer.aspx

Autres conseils

This site looks promising:

http://www.enhanceie.com/ie/dev.asp

It also mentions that you may be able to use registry entries to add a context menu:

Creating a context menu item that launches a program with the selected text

At the command prompt, run:

REG ADD "HKCU\Software\Microsoft\Internet Explorer\MenuExt\MENUITEMNAME" /ve /d "file://C:\Program Files\EXTENDIE\MENUITEMSCRIPT.htm"
REG ADD "HKCU\Software\Microsoft\Internet Explorer\MenuExt\MENUITEMNAME" /v "Contexts" /t REG_DWORD /d 16

Save the following as C:\Program Files\ExtendIE\MenuItemScript.htm

<SCRIPT LANGUAGE="JavaScript">
var parentwin = external.menuArguments; var doc = parentwin.document;
var sel = doc.selection; var rng = sel.createRange(); var str = new String(rng.text);
var oShell = new ActiveXObject("Shell.Application");
// Replace with your executable name
oShell.ShellExecute("cmd", "/k @echo " + str);
oShell = null;
</SCRIPT>
Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top