Ano, ano, přesně ty COM obsahují. Omlouvám se, že se nevyjadřuji úplně přesně (hodí se na mě přirovnání s kozou a petrželí). Níže přikládám začátek kódu pro tvorbu vytvoření command buttonu v ArcGISU, třeba to řekne víc...
<ComClass(Command1.ClassId, Command1.InterfaceId, Command1.EventsId), _
ProgId("Toolbar3D.Command1")> _
Public NotInheritable Class Command1
Inherits BaseCommand
#Region "COM GUIDs"
' These GUIDs provide the COM identity for this class
' and its COM interfaces. If you change them, existing
' clients will no longer be able to access the class.
Public Const ClassId As String = "267311e4-9e5d-49af-bef2-70427f603340"
Public Const InterfaceId As String = "9c9ce55c-641a-46b9-be43-ee72a134ec2f"
Public Const EventsId As String = "a912cda6-a5d3-428d-b12e-1b3ca2279430"
#End Region
#Region "COM Registration Function(s)"
<ComRegisterFunction(), ComVisibleAttribute(False)> _
Public Shared Sub RegisterFunction(ByVal registerType As Type)
' Required for ArcGIS Component Category Registrar support
ArcGISCategoryRegistration(registerType)
'Add any COM registration code after the ArcGISCategoryRegistration() call
End Sub
<ComUnregisterFunction(), ComVisibleAttribute(False)> _
Public Shared Sub UnregisterFunction(ByVal registerType As Type)
' Required for ArcGIS Component Category Registrar support
ArcGISCategoryUnregistration(registerType)
'Add any COM unregistration code after the ArcGISCategoryUnregistration() call
End Sub
#Region "ArcGIS Component Category Registrar generated code"
Private Shared Sub ArcGISCategoryRegistration(ByVal registerType As Type)
Dim regKey As String = String.Format("HKEY_CLASSES_ROOT\CLSID\{{{0}}}", registerType.GUID)
MxCommands.Register(regKey)
End Sub
Private Shared Sub ArcGISCategoryUnregistration(ByVal registerType As Type)
Dim regKey As String = String.Format("HKEY_CLASSES_ROOT\CLSID\{{{0}}}", registerType.GUID)
MxCommands.Unregister(regKey)
End Sub
|