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
How to Add Explorer MenuItem 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
91
User Rating
No Votes
# Votes
0
Replies
0
Publisher:
DSP, Administrator
Reference URL:
DKB
			Author: Khalid A

Creating Explorer MenuItem band object 

Answer:

1   function AddMenuItem(ConnType: TconnType; MenuText, StatusBarText,
2     GuidOrPath: string; HelpMenu: Boolean): string;
3   var
4     GUID: TGUID;
5     ID: string;
6     Reg: TRegistry;
7   begin
8     CreateGuid(GUID);
9     ID := GuidToString(GUID);
10    Reg := TRegistry.Create;
11    with Reg do
12    begin
13      RootKey := HKEY_LOCAL_MACHINE;
14      OpenKey('\Software\Microsoft\Internet Explorer\Extensions\'
15        + ID, True);
16      if HelpMenu then
17        WriteString('MenuCostumize', 'help');
18      WriteString('CLSID', '{1FBA04EE-3024-11d2-8F1F-0000F87ABD16}');
19      WriteString('MenuText', MenuText);
20      WriteString('MenuStatusBar', StatusBarText);
21      case ConnType of
22        EXECUTABLE: WriteString('Exec', GuidOrPath);
23        COM_OBJECT: WriteString('ClsidExtension', GuidOrPath);
24        SCRIPT: WriteString('Script', GuidOrPath);
25      end;
26      CloseKey;
27      OpenKey('\Software\IE5Tools\Menu Items\', True);
28      WriteString(MenuText, ID);
29      CloseKey;
30      Free;
31    end;
32    Result := ID;
33  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