Articles   Members Online:
-Article/Tip Search
-News Group Search over 21 Million news group articles.
-Delphi/Pascal
-CBuilder/C++
-C#Builder/C#
-JBuilder/Java
-Kylix
Member Area
-Home
-Account Center
-Top 10 NEW!!
-Submit Article/Tip
-Forums Upgraded!!
-My Articles
-Edit Information
-Login/Logout
-Become a Member
-Why sign up!
-Newsletter
-Chat Online!
-Indexes NEW!!
Employment
-Build your resume
-Find a job
-Post a job
-Resume Search
Contacts
-Contacts
-Feedbacks
-Link to us
-Privacy/Disclaimer
Embarcadero
Visit Embarcadero
Embarcadero Community
JEDI
Links
Adding Explorer ToolBar Btn Turn on/off line numbers in source code. Switch to Orginial background IDE or DSP color Comment or reply to this aritlce/tip for discussion. Bookmark this article to my favorite article(s). Print this article
02-Jun-03
Category
COM+
Language
Delphi 5.x
Views
94
User Rating
No Votes
# Votes
0
Replies
0
Publisher:
DSP, Administrator
Reference URL:
DKB
			Author: Khalid A

Creating  Explorer ToolBar Button 

Answer:

1   type
2     TConnType = (COM_OBJECT, EXPLORER_BAR, SCRIPT, EXECUTABLE);
3   
4   function AddBandToolbarBtn(Visible: Boolean; ConnType: TConnType;
5     BtnText, HotIcon, Icon, GuidOrPath: string): string;
6   var
7     GUID: TGUID;
8     Reg: TRegistry;
9     ID: string;
10  begin
11    CreateGuid(GUID);
12    ID := GuidToString(GUID);
13    Reg := TRegistry.Create;
14    with Reg do
15    try
16      RootKey := HKEY_LOCAL_MACHINE;
17      OpenKey('\Software\Microsoft\Internet Explorer\Extensions\'
18        + ID, True);
19      if Visible then
20        WriteString('Default Visible', 'Yes')
21      else
22        WriteString('Default Visible', 'No');
23      WriteString('ButtonText', BtnText);
24      WriteString('HotIcon', HotIcon);
25      WriteString('Icon', Icon);
26      case ConnType of
27        COM_OBJECT:
28          begin
29            WriteString('CLSID', '{1FBA04EE-3024-11d2-8F1F-0000F87ABD16}');
30            WriteString('ClsidExtension', GuidOrPath);
31          end;
32        EXPLORER_BAR:
33          begin
34            WriteString('CLSID', '{E0DD6CAB-2D10-11D2-8F1A-0000F87ABD16}');
35            WriteString('BandCLSID', GuidOrPath);
36          end;
37        EXECUTABLE:
38          begin
39            WriteString('CLSID', '{1FBA04EE-3024-11D2-8F1F-0000F87ABD16}');
40            WriteString('Exec', GuidOrPath);
41          end;
42        SCRIPT:
43          begin
44            writeString('CLSID', '{1FBA04EE-3024-11D2-8F1F-0000F87ABD16}');
45            WriteString('Script', GuidOrPath);
46          end;
47      end;
48      CloseKey;
49      OpenKey('\Software\IE5Tools\ToolBar Buttons\', True);
50      WriteString(BtnText, ID);
51      CloseKey;
52    finally
53      Free;
54    end;
55    Result := ID;
56  end;


			
Vote: How useful do you find this Article/Tip?
Bad Excellent
1 2 3 4 5 6 7 8 9 10

 

Advertisement
Share this page
Advertisement
Download from Google

Copyright © Mendozi Enterprises LLC