10-31-2019
02:28 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
10-31-2019
02:28 AM
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