How to register classes in COM component categories
Registering classes in COM component categories
There are a few different ways you can register a .NET component in a particular category:
The simplest and recommended method is to add code to your .NET classes that automatically registers the classes in a particular component category when the component is registered with COM.
By using the ArcGIS Component Category Registrar dialog box, which is part of the Visual Studio IDE Integration Framework, you can quickly add code to your classes, which automatically registers them to component categories. This dialog box uses classes from the ESRI.ArcGIS.ADF assembly to help perform the registrations.
The Customize dialog box in ArcGIS applications can be used to add commands, tools, and toolbars. By clicking the Add From File button on this dialog box, you can browse for the type library (.tlb) file created for your customization and open it, at which point the ArcGIS framework automatically adds the classes you select in the type library to the appropriate component category.
This method may be most useful if you want to use an existing compiled component, which contains command items (commands, tools, and toolbars) but does not have automatic registration code.
For .NET components, you must always select the type library, rather than the .dll file.
Another option is to use the Component Categories Manager (Categories.exe). In this case, you select the desired component category in the utility, browse for your type library, and choose the appropriate class.
This method may be most useful if you want to use an existing compiled component that contains custom classes but does not have automatic registration code.
The actual actions performed are essentially the same, regardless of the method of category registration you choose.