was ist neu ¦  programmier tips ¦  indy artikel ¦  intraweb artikel ¦  informationen ¦  links ¦  interviews
 sonstiges ¦  tutorials ¦  Add&Win Gewinnspiel

Tips (1541)

Dateien (137)
Datenbanken (90)
Drucken (35)
Grafik (114)
IDE (21)
Indy (5)
Internet / LAN (130)
IntraWeb (0)
Mathematik (76)
Multimedia (45)
Oberfläche (107)
Objekte/
ActiveX (51)

OpenTools API (3)
Sonstiges (126)
Strings (83)
System (266)
VCL (242)

Tips sortiert nach
Komponente


Tip suchen

Tip hinzufügen

Add&Win Gewinnspiel

Werbung

37 Visitors Online


 
...im Internet Explorer einen eigenen Button hinzufügen?
Autor: Dave
[ Tip ausdrucken ]  

Tip Bewertung (6):  
     


{
 This is a simple little example that allows you to add a button
 to Internet Explorer 3.0 or above
 Values:
 ButtonText := The text you want to be displayed at the bottom of the button
 MenuText := The tools option at the top of IE will now contain
 a reference to your program.
 MenuStatusbar := Script option we are not using this object. (Ignore)
 CLSID := Your classID. I won`t explain it because its complex.
 That it has to unique. You can use GUIDTOSTRING
 To create a new CLSID with the unit ActiveX.

 Default Visible := Display it.
 Exec := Your program path to execute.
 Hoticon := (Mouse Over Event) ImageIndex in shell32.dll i've picked 4
 Icon := I've selected to display shell32.dll image 4.
}


procedure CreateExplorerButton(Path: string);
const
  
Tagit = '\{10954C80-4F0F-11d3-B17C-00C0DFE39736}\';
var
  
Reg: TRegistry;
  Path1: string;
  Merge: string;
begin
  
Path := 'c:\your_program_path';
  Reg := TRegistry.Create;
  try
    with 
Reg do
    begin
      
RootKey := HKEY_LOCAL_MACHINE;
      Path1 := 'Software\Microsoft\Internet Explorer\Extensions';
      Merge := Path1 + Tagit;
      OpenKey(Merge, True);
      WriteString('ButtonText', 'ButtonText');
      WriteString('MenuText', 'Tools Menu Item');
      WriteString('MenuStatusBar', 'Run Script');
      WriteString('ClSid', '{1FBA04EE-3024-11d2-8F1F-0000F87ABD16}');
      WriteString('Default Visible', 'Yes');
      WriteString('Exec', Path + '\ProgramName.exe');
      WriteString('HotIcon', ',4');
      WriteString('Icon', ',4');
    end
  finally
    
Reg.CloseKey;
    Reg.Free;
  end;
end;

 

Bewerten Sie diesen Tipp:

dürftig
ausgezeichnet


Copyright © by SwissDelphiCenter.ch
All trademarks are the sole property of their respective owners