#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 = "8582b32d-120c-407b-af34-8719b8960b30" Public Const InterfaceId As String = "fec13c95-bd53-44cd-b8ef-f7d83f33fbb2" Public Const EventsId As String = "1e9d36cc-df74-40c4-a8a7-461a0f75b13d" #End Region
If m_dockableWindow Is Nothing Then Dim dockWindowManager As IDockableWindowManager dockWindowManager = CType(m_pApp, IDockableWindowManager) If Not dockWindowManager Is Nothing Then Dim windowID As UID = New UIDClass windowID.Value = "{8582b32d-120c-407b-af34-8719b8960b30}" m_dockableWindow = dockWindowManager.GetDockableWindow(windowID) End If End If <Target Name="BeforeClean"> <Exec WorkingDirectory="$(CommonProgramFiles)\ArcGIS\bin" Command="esriRegasm.exe "$(TargetPath)" /p:Desktop /u /s" Condition="Exists('$(TargetPath)')" /> </Target> <Target Name="AfterBuild"> <Exec WorkingDirectory="$(CommonProgramFiles)\ArcGIS\bin" Command="esriRegasm.exe "$(TargetPath)" /p:Desktop /s" /> </Target>Solved! Go to Solution.
#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"
''' <summary>
''' Required method for ArcGIS Component Category registration -
''' Do not modify the contents of this method with the code editor.
''' </summary>
Private Shared Sub ArcGISCategoryRegistration(ByVal registerType As Type)
Dim regKey As String = String.Format("HKEY_CLASSES_ROOT\CLSID\{{{0}}}", registerType.GUID)
MxDockableWindows.Register(regKey)
End Sub
''' <summary>
''' Required method for ArcGIS Component Category unregistration -
''' Do not modify the contents of this method with the code editor.
''' </summary>
Private Shared Sub ArcGISCategoryUnregistration(ByVal registerType As Type)
Dim regKey As String = String.Format("HKEY_CLASSES_ROOT\CLSID\{{{0}}}", registerType.GUID)
MxDockableWindows.Unregister(regKey)
End Sub
#End Region
#End Region
Public Class frmCLApps
Implements IDockableWindowDef
#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 = "8582b32d-120c-407b-af34-8719b8960b30"
Public Const InterfaceId As String = "fec13c95-bd53-44cd-b8ef-f7d83f33fbb2"
Public Const EventsId As String = "1e9d36cc-df74-40c4-a8a7-461a0f75b13d"
#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"
''' <summary>
''' Required method for ArcGIS Component Category registration -
''' Do not modify the contents of this method with the code editor.
''' </summary>
Private Shared Sub ArcGISCategoryRegistration(ByVal registerType As Type)
Dim regKey As String = String.Format("HKEY_CLASSES_ROOT\CLSID\{{{0}}}", registerType.GUID)
GMxDockableWindows.Register(regKey)
MxDockableWindows.Register(regKey)
SxDockableWindows.Register(regKey)
GxDockableWindows.Register(regKey)
End Sub
''' <summary>
''' Required method for ArcGIS Component Category unregistration -
''' Do not modify the contents of this method with the code editor.
''' </summary>
Private Shared Sub ArcGISCategoryUnregistration(ByVal registerType As Type)
Dim regKey As String = String.Format("HKEY_CLASSES_ROOT\CLSID\{{{0}}}", registerType.GUID)
GMxDockableWindows.Unregister(regKey)
MxDockableWindows.Unregister(regKey)
SxDockableWindows.Unregister(regKey)
GxDockableWindows.Unregister(regKey)
End Sub
#End Region
#End Region