怎样把程序粘在IE上?(100分)

  • 主题发起人 主题发起人 光华
  • 开始时间 开始时间

光华

Unregistered / Unconfirmed
GUEST, unregistred user!
怎样把程序粘在IE上?
可以介绍一下详细办法吗?
 
什么意思?象金山糍粑那样吗?
用注册表+com
 
你先说详细一点好吗?
 
可以介绍一下详细的方法吗?
我是想把程序的FORM加在IE地址下面一行里,
 
来自:woodstock 时间:00-7-2 13:59:59 ID:275151
procedure TForm1.BitBtn1Click(Sender: TObject);
var
rg:Tregistry;
begin
rg:=Tregistry.create;
rg.rootkey:=HKEY_LOCAL_MACHINE;
rg.openkey('SOFTWARE/MICROSOFT/INTERNET EXPLORER/EXTENSIONS/{0713E8D2-850A-101B-AFC0-4210102A8DA7}',true);

rg.writestring('BUTTONTEXT',Edit1.text);
rg.writestring('CLSID','{1FBA04EE-3024-11D2-8F1F-0000F87ABD16}');
rg.writestring('DEFAULT VISIBLE','YES');
rg.writestring('EXEC',Edit2.text);
rg.writestring('ICON',Edit3.text);
rg.writestring('HOTICON',Edit4.text);

rg.closekey;
rg.free;
end;

Edit1---4对应的是:
按钮的应用程序
按钮显示出来的文字
按钮开始图标
按钮浮动时的图标
 


Adding Toolbar Buttons

--------------------------------------------------------------------------------

This tutorial explains how to add a toolbar button to the Microsoft? Internet Explorer user interface. The toolbar button can either run a Win32? application, run a script, or open an Explorer Bar. If you also want to create a menu item for the Win32 application or script, see the Adding Menu Items tutorial.

Note By default, custom toolbar buttons do not appear on the Internet Explorer toolbar. These buttons will appear in the left side of the Customize Toolbar dialog box.

Requirements and Dependencies
General Steps
Adding the Details
Related Topics
Requirements and Dependencies
Developers who want to add toolbar buttons to Internet Explorer must be familiar with the registry and globally unique identifiers (GUID).

This feature is only available in Internet Explorer 5 and later. Internet Explorer 4.0 allows you to add a custom Explorer Bar, but there is no method for adding a toolbar button to access your Explorer Bar.

Toolbar buttons require two sets of icons: one set with the active (color) icons and one set with the default (grayscale) icons. These icons can be stored in two .ico files or inside a resource (like a .dll or .exe file). For more information about what icons are required and for tips on designing icons for Internet Explorer, see Toolbar Button Style Guide.

General Steps
The steps in this section must be followed when adding any toolbar buttons to the Internet Explorer user interface. If any information is omitted, the toolbar button will not be displayed.

Icons and strings stored inside a resource can be referenced by providing the path to the resource and reference identification in the format, "path; resource_id". For example, if you wanted to use string resource 123 in Example.dll, you would use "Example.dll, 123".

Note This tutorial describes how to add a toolbar button for all users. If you want the toolbar button displayed for the current user only, substitute HKEY_CURRENT_USER for HKEY_LOCAL_MACHINE in the steps below.

Create a valid globally unique identifier (GUID). You can use Guidgen.exe (which ships with Microsoft? Visual Studio?) or Uuidgen.exe (which ships in the Microsoft? Platform Software Development Kit(SDK). ).
Create a new key (with the GUID as the name) in the registry under:
HKEY_LOCAL_MACHINE/Software/Microsoft/Internet Explorer/Extensions

The result should look like:

HKEY_LOCAL_MACHINE/Software/Microsoft/Internet Explorer/Extensions/<Your GUID>

<Your GUID> is the valid GUID that you created in step 1.

Optional. Create a new string value, Default Visible, in the registry under:
HKEY_LOCAL_MACHINE/Software/Microsoft/Internet Explorer/Extensions/<Your GUID>

The result should look like:

HKEY_LOCAL_MACHINE/Software/Microsoft/Internet Explorer/Extensions/<Your GUID>/Default Visible

To make the toolbar button to appear on the Internet Explorer toolbar by default, set Default Visible to "Yes", otherwise set Default Visible to "No".

Note If the user has customized the toolbar, the button will not appear on the toolbar automatically. The toolbar button will be added to the choices in the Customize Toolbar dialog box and will appear if the toolbar is reset.

Create a new string value, ButtonText, in the registry under:
HKEY_LOCAL_MACHINE/Software/Microsoft/Internet Explorer/Extensions/<Your GUID>

The result should look like:

HKEY_LOCAL_MACHINE/Software/Microsoft/Internet Explorer/Extensions/<Your GUID>/ButtonText

Set the value of ButtonText to the label you want for the toolbar button.

Create a new string value, HotIcon, in the registry under:
HKEY_LOCAL_MACHINE/Software/Microsoft/Internet Explorer/Extensions/<Your GUID>

The result should look like:

HKEY_LOCAL_MACHINE/Software/Microsoft/Internet Explorer/Extensions/<Your GUID>/HotIcon

Set the value of HotIcon to the full path of the .ico file that contains the three color icons.

Create a new string value, Icon, in the registry under:
HKEY_LOCAL_MACHINE/Software/Microsoft/Internet Explorer/Extensions/<Your GUID>

The result should look like:

HKEY_LOCAL_MACHINE/Software/Microsoft/Internet Explorer/Extensions/<Your GUID>/Icon

Set the value of Icon to the full path of the .ico file that contains the three grayscale icons.

Optional. Provide support for multiple native languages (like French or Japanese).
Complete the following steps to support different native languages:

Determine the LCID of the native language you want to support. These values can be found in the Microsoft? Platform Software Development Kit(SDK).
Create a new key, Lang####, using the LCID from the previous step in place of "####" in the registry under;
HKEY_LOCAL_MACHINE/Software/Microsoft/Internet Explorer/Extensions/<Your GUID>

The result should look like:

HKEY_LOCAL_MACHINE/Software/Microsoft/Internet Explorer/Extensions/<Your GUID>/Lang####

For example, the key name should be Lang0411 for a Japanese implementation, since the LCID for Japanese is 0411.

Adding the Details
After completing the initial step of creating a new registry key, you will add values under the key. The values that you will need and the other steps to follow depend on what the toolbar button is going to run. The following list contains links to the sections with the steps required to complete the addition of a toolbar button.

COM Objects
Explorer Bars
Scripts
Executable Files
COM Objects
The following steps are required to complete the creation of a toolbar button that implements a COM object. If any information (that isn't optional) is omitted, the toolbar button will not be displayed.

Note This tutorial describes how to add a toolbar button for all users. If you want the toolbar button displayed for the current user only, substitute HKEY_CURRENT_USER for HKEY_LOCAL_MACHINE in the steps below.

Register the COM object.
Create a new string value, CLSID, in the registry under:
HKEY_LOCAL_MACHINE/Software/Microsoft/Internet Explorer/Extensions/<Your GUID>

The result should look like:

HKEY_LOCAL_MACHINE/Software/Microsoft/Internet Explorer/Extensions/<Your GUID>/CLSID

Set the value of CLSID equal to {1FBA04EE-3024-11d2-8F1F-0000F87ABD16}.

Create a new string value, ClsidExtension, in the registry under:
HKEY_LOCAL_MACHINE/Software/Microsoft/Internet Explorer/Extensions/<Your GUID>

The result should look like:

HKEY_LOCAL_MACHINE/Software/Microsoft/Internet Explorer/Extensions/<Your GUID>/ClsidExtension

Set the value of ClsidExtension equal to the GUID of the COM object.

In addition to the previous steps, the COM object must implement IOleCommandTarget.

If your COM object needs to access the DHTML Object Model of the page that Internet Explorer is currently displaying, you must implement IObjectWithSite.


The implementations of IOleCommandTarget's methods are standard, except for IOleCommandTarget::Exec. The COM object's IOleCommandTarget::Exec method is called with nCmdID=1 if the toolbar button is clicked and nCmdID=2 if the menu item is clicked. This difference allows developers to provide different behaviors for the toolbar button and the menu item.

When IObjectWithSite is implemented, Internet Explorer will call IObjectWithSite::SetSite and pass it a pointer to IShellBrowser.

Explorer Bars
The following steps are required to complete the creation of a toolbar button that opens an Explorer Bar. If any information (that isn't optional) is omitted, the toolbar button will not be displayed.

Note This tutorial describes how to add a toolbar button for all users. If you want the toolbar button displayed for the current user only, substitute HKEY_CURRENT_USER for HKEY_LOCAL_MACHINE in the steps below.

Create a new string value, CLSID, in the registry under:
HKEY_LOCAL_MACHINE/Software/Microsoft/Internet Explorer/Extensions/<Your GUID>

The result should look like:

HKEY_LOCAL_MACHINE/Software/Microsoft/Internet Explorer/Extensions/<Your GUID>/CLSID

Set the value of CLSID equal to {E0DD6CAB-2D10-11D2-8F1A-0000F87ABD16}.

Create a new string value, BandCLSID, in the registry under:
HKEY_LOCAL_MACHINE/Software/Microsoft/Internet Explorer/Extensions/<Your GUID>

The result should look like:

HKEY_LOCAL_MACHINE/Software/Microsoft/Internet Explorer/Extensions/<Your GUID>/BandCLSID

Set the value of BandCLSID to the CLSID of the Explorer Bar you want to open.

Note All Explorer Bars have a menu item added to the View menu automatically.

Scripts
The following steps are required to complete the creation of a toolbar button that runs a script. If any information (that isn't optional) is omitted, the toolbar button will not be displayed.

Note This tutorial describes how to add a toolbar button for all users. If you want the toolbar button displayed for the current user only, substitute HKEY_CURRENT_USER for HKEY_LOCAL_MACHINE in the steps below.

Create a new string value, CLSID, in the registry under:
HKEY_LOCAL_MACHINE/Software/Microsoft/Internet Explorer/Extensions/<Your GUID>

The result should look like:

HKEY_LOCAL_MACHINE/Software/Microsoft/Internet Explorer/Extensions/<Your GUID>/CLSID

Set the value of CLSID equal to {1FBA04EE-3024-11D2-8F1F-0000F87ABD16}.

Create a new string value, Script, in the registry under:
HKEY_LOCAL_MACHINE/Software/Microsoft/Internet Explorer/Extensions/<Your GUID>

The result should look like:

HKEY_LOCAL_MACHINE/Software/Microsoft/Internet Explorer/Extensions/<Your GUID>/Script

Set the value of Script to the full path of the script that will be run.

To add a menu item in the Tools menu with the same functionality, see Scripts in the Adding Menu Items tutorial.

Executable Files
The following steps are required to complete the creation of a toolbar button that runs an .exe file. If any information (that isn't optional) is omitted, the toolbar button will not be displayed.

Note This tutorial describes how to add a toolbar button for all users. If you want the toolbar button displayed for the current user only, substitute HKEY_CURRENT_USER for HKEY_LOCAL_MACHINE in the steps below.

Create a new string value, CLSID, in the registry under:
HKEY_LOCAL_MACHINE/Software/Microsoft/Internet Explorer/Extensions/<Your GUID>

The result should look like:

HKEY_LOCAL_MACHINE/Software/Microsoft/Internet Explorer/Extensions/<Your GUID>/CLSID

Set the value of CLSID equal to {1FBA04EE-3024-11D2-8F1F-0000F87ABD16}.

Create a new string value, Exec, in the registry under:
HKEY_LOCAL_MACHINE/Software/Microsoft/Internet Explorer/Extensions/<Your GUID>

The result should look like:

HKEY_LOCAL_MACHINE/Software/Microsoft/Internet Explorer/Extensions/<Your GUID>/Exec

Set the value of Exec to the full path of the .exe file that will be run.

To add an item to the Tools menu with the same functionality, see Executable Files in the Adding Menu Items tutorial.

Related Topics
The following lists contain links to topics related to adding toolbar buttons.

Overviews

Browser Extensions Overview
Toolbar Button Style Guide
Web Accessories Overview
Tutorials

Adding Menu Items


Back to top
Did you find this topic useful? Suggestions for other topics? Write us!
Active Server Pages error 'ASP 0113'

Script timed out

/workshop/browser/ext/tutorials/button.asp

The maximum amount of time for a script to execute was exceeded. You can change this limit by specifying a new value for the property Server.ScriptTimeout or by changing the value in the IIS administration tools.

 
看上面啦可以解决N多问题了
 
我是想把整个可以运行的程序加在上面,好象网易那个新闻器那样啊。
 
你试试我copy过来的代码了么?IE5下是可以的!
 
试试我编写的<a href="http://go18.163.com/~windstorm2000/program/IET.zip">IE小精灵</a>吧!
 
我是想把整个运行的程序粘在IE的地址栏下面,好象网易新闻器那样
 
http://www.intelligo.net/iedelphi/
IE5Tools
 
接受答案了.
 
后退
顶部