Scalabium Software

SMExport/SMImport suites
Knowledge for your independence'.
Home Delphi and C++Builder tips


#69: How can I receive a names of all registered components?

If you want to write the own expert for Delphi/C++Builder IDE and you want to display the names of all registered components, you can use the next code:

uses TypInfo, ToolIntf, Exptintf;

procedure GetComponentNames(lst: TStrings);
var
  i, k: Integer;
  CRef: TClass;
  strName: ShortString;
begin
  lst.Clear;
  for i := 0 to ToolServices.GetModuleCount-1 do
  begin
    for k := 0 to ToolServices.GetComponentCount(i)-1 do
      begin
       CRef := TClass(GetClass(ToolServices.GetComponentName(i, k)));
       while CRef <> nil do
       begin
         strName := CRef.ClassName;
         if lst.IndexOf(strName) = -1 then
           lst.Add(strName);
         if str <> 'TComponent' then
          CRef := CRef.ClassParent
         else
           CRef := nil;
       end;
      end;
  end;
end;


Published: March 16, 2000

See also
 
DBISAM Password Recovery
MAPIMail
ExcelFile Viewer
ABA Document Convert
ABA Picture Convert
DBLoad
Viewer for TNEF-files (winmail.dat)
Viewer for MS Outlook Messages
DBISAM Viewer
Paradox Viewer
 
 


Contact to webmaster

 

Borland Software Code Gear Scalabium Delphi tips

Copyright© 1998-2017, Scalabium Software. All rights reserved.
webmaster@scalabium.com

SMReport Autogenerated