www.pudn.com > Add2IE.rar > AddBt2IE.pas, change:2001-01-01,size:4757b


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.