- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I'm trying to create a custom dockable window in my Inventor Addin (VB.NET), which will take a Windows Form - which I will populate with desired content - as its content.
I have a placeholder form ready, and I actually managed to get the dockable window to show up, but either with nothing in it, or with an empty form window, with none of the buttons and text boxes I added for verifiication, showing up. Right now, the dockable window itself is not even getting loaded, and I'm not sure what's different from when earlier "partial successes".
Either way - the API help tells me to make sure to "create the dialog as a modeless dialog", and I'm not sure how exactly to do that. I know I need to call "<dialog>.show()" for modeless interaction, but do I put that as a "Me.Show" inside the form code as an event handler On Load, or do I call it directly within the "Activate"-Sub? Or do I handle modeless interaction in some completely different way?
This is my code, inside the "Activate"-sub of the StandardAddinServer-class.
Dim UiRessourceDocker As DockableWindows = g_inventorApplication.UserInterfaceManager.DockableWindows
Dim cheatSheetWindow As DockableWindow = UiRessourceDocker.Add(AddInClientID, "CheatSheet", "Cheat Sheet")
cheatSheetWindow.Visible = True
Dim oCheatSheet As New Form1
cheatSheetWindow.AddChild(oCheatSheet.Handle)
This is my form, and the code behind it:
Public Class Form1
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
MsgBox("Test")
End Sub
End Class
Solved! Go to Solution.