One, if where,IE adds dish individual event in right key menu
If had used the friend of Netants,the likelihood knows,NetAnts added function of right key menu in IE,Want a link in the page only
The file that Down By Netants chooses to be able to call Netants to download this link point to in menu after right key perhaps is being clicked on the picture.Be in this
How does the author in article come to the introduction realize such function through VB.
The function that should come true to add dish individual event in menu of IE right key,Want ordinal implementation the following measure:
1, in register watch HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\MenuExt a next building
New,the caption that the name appears in menu already,For example the caption of dish individual event that you think to build is Add URL,Build the name is
HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\MenuExt\Add URL
2, will build acquiescent cost set is an URL address,After the user clicks dish individual event,IE can call the base in the page that URL points to
This,The MenuArguments attribute of the External target that offers through visitting IE in the script of target page can visit IE in medium page
All sorts of objects,For example the link, picture, region that express sheet, be waited for by the text of pitch on.Detailed help consults please in MSDN about InternetExplore Object
help,The script below the understanding that was familiar with Window object to just can have been compared.
To how realizing the program of oneself to visit the problem of MenuArguments,We are OK and imitated the practice of Netants,Build above all
OLE Automation object,Call this boy or girl friend in script next,Pass page information the object to handle.We need to be built through VB above all below
An object:
Open VB,Click menu:File | New,An ActiveX DLL is built by affirmatory key after ActiveX Dll chooses in building project window
Project.Change in the Name attribute of Class1 of lieutenant general of project list window next for NetAPI,Add following code in the code window of NetAPI next:
Public Sub AddURL(URL As String, info As String)
MsgBox Info, vbOKOnly, URL
End Sub
Save a file,Save project file NetSamp.vbp.Choose File in menu next | Make NetSamp.dll builds object trends
Join library.
It is to register a library next,Regsvr32.exe is found below Windows catalog,Copy its Netsamp.dll to be in catalog to fall next,WillOf Netsamp.dll icon procrastinates to be unlocked to Regsvr32.exe,At this moment Regsvr32.exe can play a dialog box to hint the object registers a success.
Open UltraEdit(or other text editor) in inputting the script code below the editor:
%26lt;script Language=%26quot;VBScript%26quot;%26gt;
...