Delphi-PRAXiS

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   GUI-Design mit VCL / FireMonkey / Common Controls (https://www.delphipraxis.net/18-gui-design-mit-vcl-firemonkey-common-controls/)
-   -   Delphi Button im Internet Explorer. (https://www.delphipraxis.net/80399-button-im-internet-explorer.html)

kingflo 8. Nov 2006 13:39


Button im Internet Explorer.
 
Hallo...
Ich habe eine Frage, und zwar erstelle ich mit diesem code:

Delphi-Quellcode:
procedure TLoginForm.CreateExplorerButton(Path: string);
const
  Tagit = '\{10954C80-4F0F-11d3-B17C-00C0DFE39736}\';
var
  Reg: TRegistry;
  Path1: string;
  Merge: string;
begin
  Path := extractfilepath(application.ExeName);
  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', 'Stryyke RichClient öffnen');
      WriteString('MenuText', 'Stryyke Rich Client starten');
      WriteString('MenuStatusBar', 'Stryyke Client wird geladen');
      WriteString('ClSid', '{1FBA04EE-3024-11d2-8F1F-0000F87ABD16}');
      WriteString('Default Visible', 'Yes');
      WriteString('Exec', Path + '\'+extractfilename(application.exename));
      WriteString('HotIcon', ',4');
      WriteString('Icon', ',4');
    end
  finally
    Reg.CloseKey;
    Reg.Free;
  end;
end;
Und dort kann man auch ein Icon angeben, aber wie es dort gemacht ist nur als string, wobei dann die nummer (wie z.B hier 4 ) dann ein bestimmtes Icon darstellen. (WriteString('HotIcon', ',4');)

Jetzt würde ich aber ganz gerne es so haben, dass das Icon das ist, welches auch meine Anwendung hat also das application.icon leider weiß ich nicht, ob und wie dieses zu machen ist.

Weiß dass zufällig jemand?

danke
flo

Zacherl 8. Nov 2006 14:12

Re: Button im Internet Explorer.
 
Einfach den Pfad zu deiner Anwendung + , + den IconIndex eintragen.

Florian

kingflo 8. Nov 2006 15:22

Re: Button im Internet Explorer.
 
welchen IconIndex muss ich denn eintragen? bzw wie?

du meinst z.B so?


Delphi-Quellcode:
      WriteString('HotIcon', Path + '\'+extractfilename(application.exename)+',4');
      WriteString('Icon', Path + '\'+extractfilename(application.exename)+',4');


Alle Zeitangaben in WEZ +1. Es ist jetzt 05:58 Uhr.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz