增加ie工具条的问题(100分)

  • 主题发起人 主题发起人 热血
  • 开始时间 开始时间

热血

Unregistered / Unconfirmed
GUEST, unregistred user!
我在ie工具栏上加了一个自己工具条,但有时注册该工具条时,该工具条不能显示出来,需要在ie工具栏上右键然后选择此工具条才能显示,有没有什么办法无论什么时候
注册此工具条能显示?工具栏的信息放在HKEY_CURRENT_USER/Software/Microsoft/Internet Explorer/Toolbar/WebBrowser/ITBarLayout
里面
但不知道具体的数据作用.

 
不知道谁写的了,你也许有用
unit AddBt2IE;
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
StdCtrls, ComCtrls,shellapi, Buttons,Registry;
type
TForm1 = class(TForm)
OpenDialog1: TOpenDialog;
OpenDialog2: TOpenDialog;
GroupBox2: TGroupBox;
Label6: TLabel;
Label7: TLabel;
Label8: TLabel;
Label9: TLabel;
Echxu: TEdit;
Button1: TButton;
Ewenzi: TEdit;
Etubiao1: TEdit;
Button2: TButton;
Etubiao2: TEdit;
Button3: TButton;
Button4: TButton;
BitBtn1: TBitBtn;
BitBtn2: TBitBtn;
procedure BitBtn2Click(Sender: TObject);
procedure Button1Click(Sender: TObject);
procedure Button2Click(Sender: TObject);
procedure Button4Click(Sender: TObject);
procedure BitBtn1Click(Sender: TObject);
procedure BitBtn1MouseDown(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
procedure BitBtn1MouseUp(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
procedure BitBtn2MouseDown(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
procedure BitBtn2MouseUp(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
procedure Button1MouseDown(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
procedure Button1MouseUp(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
procedure FormCreate(Sender: TObject);
procedure Label4Click(Sender: TObject);
procedure FormMouseMove(Sender: TObject; Shift: TShiftState; X,
Y: Integer);
procedure BitBtn1MouseMove(Sender: TObject; Shift: TShiftState; X,
Y: Integer);
procedure BitBtn2MouseMove(Sender: TObject; Shift: TShiftState; X,
Y: Integer);
private
{ Private declarations }
public
{ Public declarations }
end;

var
Form1: TForm1;

implementation

{$R *.DFM}

procedure TForm1.BitBtn2Click(Sender: TObject);
begin
Application.Terminate;
end;

procedure TForm1.Button1Click(Sender: TObject);
begin
if OpenDialog1.execute
then
Echxu.text:=openDialog1.filename
end;

procedure TForm1.Button2Click(Sender: TObject);
begin
if OpenDialog2.execute
then
Etubiao1.text:=openDialog2.filename
end;

procedure TForm1.Button4Click(Sender: TObject);
begin
if OpenDialog2.execute
then
Etubiao2.text:=openDialog2.filename
end;

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',Ewenzi.text);
rg.writestring('CLSID','{1FBA04EE-3024-11D2-8F1F-0000F87ABD16}');
rg.writestring('DEFAULT VISIBLE','YES');
rg.writestring('EXEC',Echxu.text);
rg.writestring('ICON',Etubiao1.text);
rg.writestring('HOTICON',Etubiao2.text);

rg.closekey;
rg.free;
end;

procedure TForm1.BitBtn1MouseDown(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
begin

if BitBtn1.font.color=clgreen
then
BitBtn1.font.color:=clred;

end;

procedure TForm1.BitBtn1MouseUp(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
begin
BitBtn1.font.color:=clgreen
end;

procedure TForm1.BitBtn2MouseDown(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
begin
BitBtn2.font.color:=clred;
end;

procedure TForm1.BitBtn2MouseUp(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
begin
BitBtn2.font.color:=clgreen;
end;

procedure TForm1.Button1MouseDown(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
begin
Button1.font.color:=clred;
end;

procedure TForm1.Button1MouseUp(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
begin
Button1.font.color:=clgreen;
end;

procedure TForm1.FormCreate(Sender: TObject);
begin
Application.hintcolor:=clyellow;
Application.hintpause:=0;
end;

procedure TForm1.Label4Click(Sender: TObject);
begin
ShellExecute(handle,nil,pchar('mailto:yukaikai@263.net'),nil,nil,sw_shownormal);
end;

procedure TForm1.FormMouseMove(Sender: TObject; Shift: TShiftState; X,
Y: Integer);
begin
Bitbtn1.Font.color:=clgreen;
Bitbtn2.Font.color:=clgreen;

end;

procedure TForm1.BitBtn1MouseMove(Sender: TObject; Shift: TShiftState; X,
Y: Integer);
begin
BitBtn1.font.color:=clblue;
end;

procedure TForm1.BitBtn2MouseMove(Sender: TObject; Shift: TShiftState; X,
Y: Integer);
begin
BitBtn2.font.color:=clblue;
end;

end.
 
谢谢
看了一下
上面是增加一个按钮的
 
接受答案了.
 
请问如何向IE中加入一个工具条,请指教,我的mail是soj@suypower.com,谢谢
 

Similar threads

S
回复
0
查看
3K
SUNSTONE的Delphi笔记
S
S
回复
0
查看
2K
SUNSTONE的Delphi笔记
S
I
回复
0
查看
581
import
I
I
回复
0
查看
764
import
I
后退
顶部