Announcements
Attention for Customers without Multi-Factor Authentication or Single Sign-On - OTP Verification rolls out April 2025. Read all about it here.

Try this:

 

        Private Sub AddToUserInterface()
            Dim addInCLS As GuidAttribute
            addInCLS = CType(System.Attribute.GetCustomAttribute(GetType(StandardAddInServer), GetType(GuidAttribute)), GuidAttribute)
            addInCLSIDString = "{" & addInCLS.Value & "}"
            Dim uiMgr As UserInterfaceManager = g_inventorApplication.UserInterfaceManager
            Dim myDockableWindow As DockableWindow = uiMgr.DockableWindows.Add(addInCLSIDString, "MyWindow", "My Add-in Dock")
            myDockableWindow.Visible = True
            myDockableWindow.DockingState = DockingStateEnum.kDockRight
            myDockableWindow.AddChild(CreateChildDialog())
            myDockableWindow.DockingState = DockingStateEnum.kDockRight
            myDockableWindow.Visible = True

        End Sub

        Public Function CreateChildDialog() As Long
            If Not oForm Is Nothing Then
                oForm.Dispose()
                oForm = Nothing
            End If
            oForm = New projektcntr
            oForm.Show()
            Return oForm.Handle.ToInt64()
        End Function