<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: How To Add a UserControl Or Userform to a DockableWindow in Inventor? in Inventor Programming - iLogic, Macros, AddIns &amp; Apprentice</title>
    <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/how-to-add-a-usercontrol-or-userform-to-a-dockablewindow-in/m-p/9119766#M102652</link>
    <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;        Private Sub m_AppEvents_OnActivateDocument(ByVal DocumentObject As Inventor._Document, _
                                                    ByVal BeforeOrAfter As Inventor.EventTimingEnum, _
                                                     ByVal Context As Inventor.NameValueMap, _
                                                    ByRef HandlingCode As Inventor.HandlingCodeEnum) Handles m_AppEvents.OnActivateDocument
            If BeforeOrAfter &amp;lt;&amp;gt; EventTimingEnum.kAfter Then

                Exit Sub

            End If
            Dim odoc As Inventor.Document
            odoc = g_inventorApplication.ActiveEditDocument
            Dim eDocumentType As DocumentTypeEnum = odoc.DocumentType
            Dim chb As CheckBox
            Dim sDocumentType As String = "Unknown"
            Select Case eDocumentType
                Case DocumentTypeEnum.kAssemblyDocumentObject
                    For Each a As Control In oform.GroupBox1.Controls
                        If TypeOf a Is Windows.Forms.TextBox Then
                            a.Text = Nothing
                        End If
                    Next
                    Dim odef As AssemblyComponentDefinition = odoc.componentdefinition
                    Dim occ As ComponentOccurrence
                    For Each occ In odef.Occurrences
                        If TypeOf occ.Definition Is AssemblyComponentDefinition Then
                            '              oForm.ComboBox1.Items.Add(occ.Name)
                        End If
                    Next

                    oform.TextBox1.Text = odef.Parameters.UserParameters.Item("height").Value * 10
                    oform.TextBox2.Text = odef.Parameters.UserParameters.Item("width").Value * 10
                    oform.TextBox3.Text = odef.Parameters.UserParameters.Item("depth").Value * 10
                    oform.TextBox4.Text = odef.Parameters.UserParameters.Item("front_bolt_qty").Value
                    oform.TextBox5.Text = odef.Parameters.UserParameters.Item("front_bolt_distance").Value * 10
                    oform.TextBox6.Text = odef.Parameters.UserParameters.Item("top_bottom_bolt_qty").Value
                    oform.TextBox7.Text = odef.Parameters.UserParameters.Item("top_bottom_bolt_distance").Value * 10
                    oform.GroupBox1.Text = odoc.PropertySets.Item("Design Tracking Properties").Item("Description").Value
                    For idx = 1 To oform.GroupBox1.Controls.Count
                        chb = oform.GroupBox1.Controls.Item(idx)
                        If odoc.PropertySets.Item("Inventor User Defined Properties").Item(oform.GroupBox1.Controls.Item(idx).Text).Value = "1" Then

                            chb.Checked = 1
                        Else
                            chb.Checked = 0
                        End If

                    Next

                    '  sDocumentType = "Assembly Document"
                    '      oForm.ComboBox1.Items.Clear()
                    ' oForm.TextBox1.Text = ""
              Case DocumentTypeEnum.kPartDocumentObject
                    sDocumentType = "Part Document"
                    Dim opdef As PartComponentDefinition = odoc.componentdefinition
                    For Each a As Control In oform.GroupBox1.Controls
                        If TypeOf a Is Windows.Forms.TextBox Then
                            a.Text = Nothing
                        End If
                    Next
                    oform.GroupBox1.Text = odoc.PropertySets.Item("Design Tracking Properties").Item("Description").Value

                    For idx = 1 To oform.GroupBox1.Controls.Count
                        chb = oform.GroupBox1.Controls.Item(idx)

                        If odoc.PropertySets.Item("Inventor User Defined Properties").Item(oform.GroupBox1.Controls.Item(idx).Text).Value = "1" Then

                            chb.Checked = 1
                        Else
                            chb.Checked = 0
                        End If

                    Next
                    oform.TextBox1.Text = opdef.Parameters.UserParameters.Item("height").Value * 10
                    oform.TextBox2.Text = opdef.Parameters.UserParameters.Item("width").Value * 10
                    oform.TextBox3.Text = opdef.Parameters.UserParameters.Item("depth").Value * 10
                    oform.TextBox4.Text = opdef.Parameters.UserParameters.Item("front_bolt_qty").Value
                    oform.TextBox5.Text = opdef.Parameters.UserParameters.Item("front_bolt_distance").Value * 10
                    oform.TextBox6.Text = opdef.Parameters.UserParameters.Item("top_bottom_bolt_qty").Value
                    oform.TextBox7.Text = opdef.Parameters.UserParameters.Item("top_bottom_bolt_distance").Value * 10

            End Select
     End Sub&lt;/PRE&gt;</description>
    <pubDate>Thu, 31 Oct 2019 13:33:22 GMT</pubDate>
    <dc:creator>marcin_otręba</dc:creator>
    <dc:date>2019-10-31T13:33:22Z</dc:date>
    <item>
      <title>How To Add a UserControl Or Userform to a DockableWindow in Inventor?</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/how-to-add-a-usercontrol-or-userform-to-a-dockablewindow-in/m-p/9119070#M102627</link>
      <description>&lt;P&gt;How To Add a UserControl Or Userform to a DockableWindow in Inventor?&lt;/P&gt;&lt;P&gt;I have this sample but i would like to add labels; textboxes; etc to the Dockablewindow.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;Dim oUserInterfaceMgr As UserInterfaceManager
        oUserInterfaceMgr = ThisApplication.UserInterfaceManager

        ' Create a new dockable window
        Dim oWindow As DockableWindow
        oWindow = oUserInterfaceMgr.DockableWindows.Add("SampleClientId", "TestWindowInternalName", "Test Window")

        ' Get the hwnd of the dialog to be added as a child
        ' CHANGE THIS VALUE!
        Dim hwnd As Long
        hwnd = 4851096

        ' Add the dialog as a child to the dockable window
        oWindow.AddChild(hwnd) &lt;FONT face="arial black,avant garde" color="#FF0000"&gt;Her I would like to add a UserControl or Userfrom!!!!!&lt;/FONT&gt;

        ' Don't allow docking to top and bottom
        oWindow.DisabledDockingStates = DockingStateEnum.kDockTop And DockingStateEnum.kDockBottom

        ' Make the window visible
        oWindow.Visible = True&lt;/PRE&gt;&lt;P&gt;Does anyone have a sample for this?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;</description>
      <pubDate>Thu, 31 Oct 2019 08:56:13 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/how-to-add-a-usercontrol-or-userform-to-a-dockablewindow-in/m-p/9119070#M102627</guid>
      <dc:creator>bradeneuropeArthur</dc:creator>
      <dc:date>2019-10-31T08:56:13Z</dc:date>
    </item>
    <item>
      <title>Re: How To Add a UserControl Or Userform to a DockableWindow in Inventor?</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/how-to-add-a-usercontrol-or-userform-to-a-dockablewindow-in/m-p/9119142#M102629</link>
      <description>&lt;P&gt;Try this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;        Private Sub AddToUserInterface()
            Dim addInCLS As GuidAttribute
            addInCLS = CType(System.Attribute.GetCustomAttribute(GetType(StandardAddInServer), GetType(GuidAttribute)), GuidAttribute)
            addInCLSIDString = "{" &amp;amp; addInCLS.Value &amp;amp; "}"
            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


&lt;/PRE&gt;</description>
      <pubDate>Thu, 31 Oct 2019 09:28:26 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/how-to-add-a-usercontrol-or-userform-to-a-dockablewindow-in/m-p/9119142#M102629</guid>
      <dc:creator>marcin_otręba</dc:creator>
      <dc:date>2019-10-31T09:28:26Z</dc:date>
    </item>
    <item>
      <title>Re: How To Add a UserControl Or Userform to a DockableWindow in Inventor?</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/how-to-add-a-usercontrol-or-userform-to-a-dockablewindow-in/m-p/9119255#M102633</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for the code.&lt;/P&gt;&lt;P&gt;Do you know if it is possible to add a Usercontrol (VB.net) to the DockableWindow too?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;</description>
      <pubDate>Thu, 31 Oct 2019 10:18:56 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/how-to-add-a-usercontrol-or-userform-to-a-dockablewindow-in/m-p/9119255#M102633</guid>
      <dc:creator>bradeneuropeArthur</dc:creator>
      <dc:date>2019-10-31T10:18:56Z</dc:date>
    </item>
    <item>
      <title>Re: How To Add a UserControl Or Userform to a DockableWindow in Inventor?</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/how-to-add-a-usercontrol-or-userform-to-a-dockablewindow-in/m-p/9119275#M102635</link>
      <description>&lt;P&gt;i do not remember but you can add userform and turn off frames, maximalize, minimalize buttons&amp;nbsp; and all and it will look like control.&amp;nbsp; Mine look like this&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="form.png" style="width: 261px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/693262i3EFAE1E65C54B080/image-size/large?v=v2&amp;amp;px=999" role="button" title="form.png" alt="form.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 31 Oct 2019 10:28:03 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/how-to-add-a-usercontrol-or-userform-to-a-dockablewindow-in/m-p/9119275#M102635</guid>
      <dc:creator>marcin_otręba</dc:creator>
      <dc:date>2019-10-31T10:28:03Z</dc:date>
    </item>
    <item>
      <title>Re: How To Add a UserControl Or Userform to a DockableWindow in Inventor?</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/how-to-add-a-usercontrol-or-userform-to-a-dockablewindow-in/m-p/9119320#M102636</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Think that the UserControls are not modeless (showdialog), that is why it is not funcioning!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for your help!&lt;/P&gt;</description>
      <pubDate>Thu, 31 Oct 2019 10:44:04 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/how-to-add-a-usercontrol-or-userform-to-a-dockablewindow-in/m-p/9119320#M102636</guid>
      <dc:creator>bradeneuropeArthur</dc:creator>
      <dc:date>2019-10-31T10:44:04Z</dc:date>
    </item>
    <item>
      <title>Re: How To Add a UserControl Or Userform to a DockableWindow in Inventor?</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/how-to-add-a-usercontrol-or-userform-to-a-dockablewindow-in/m-p/9119727#M102649</link>
      <description>&lt;P&gt;Any idea how to update the form with properties and values form the active document?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;</description>
      <pubDate>Thu, 31 Oct 2019 13:21:02 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/how-to-add-a-usercontrol-or-userform-to-a-dockablewindow-in/m-p/9119727#M102649</guid>
      <dc:creator>bradeneuropeArthur</dc:creator>
      <dc:date>2019-10-31T13:21:02Z</dc:date>
    </item>
    <item>
      <title>Re: How To Add a UserControl Or Userform to a DockableWindow in Inventor?</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/how-to-add-a-usercontrol-or-userform-to-a-dockablewindow-in/m-p/9119737#M102650</link>
      <description>&lt;P&gt;i do it OnActivateDocument.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;then just type oform.textbox1.text=....&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 31 Oct 2019 13:24:20 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/how-to-add-a-usercontrol-or-userform-to-a-dockablewindow-in/m-p/9119737#M102650</guid>
      <dc:creator>marcin_otręba</dc:creator>
      <dc:date>2019-10-31T13:24:20Z</dc:date>
    </item>
    <item>
      <title>Re: How To Add a UserControl Or Userform to a DockableWindow in Inventor?</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/how-to-add-a-usercontrol-or-userform-to-a-dockablewindow-in/m-p/9119753#M102651</link>
      <description>&lt;P&gt;when i do that i receive en error.&lt;/P&gt;&lt;P&gt;could you send an example for me?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 31 Oct 2019 13:28:43 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/how-to-add-a-usercontrol-or-userform-to-a-dockablewindow-in/m-p/9119753#M102651</guid>
      <dc:creator>bradeneuropeArthur</dc:creator>
      <dc:date>2019-10-31T13:28:43Z</dc:date>
    </item>
    <item>
      <title>Re: How To Add a UserControl Or Userform to a DockableWindow in Inventor?</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/how-to-add-a-usercontrol-or-userform-to-a-dockablewindow-in/m-p/9119766#M102652</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;        Private Sub m_AppEvents_OnActivateDocument(ByVal DocumentObject As Inventor._Document, _
                                                    ByVal BeforeOrAfter As Inventor.EventTimingEnum, _
                                                     ByVal Context As Inventor.NameValueMap, _
                                                    ByRef HandlingCode As Inventor.HandlingCodeEnum) Handles m_AppEvents.OnActivateDocument
            If BeforeOrAfter &amp;lt;&amp;gt; EventTimingEnum.kAfter Then

                Exit Sub

            End If
            Dim odoc As Inventor.Document
            odoc = g_inventorApplication.ActiveEditDocument
            Dim eDocumentType As DocumentTypeEnum = odoc.DocumentType
            Dim chb As CheckBox
            Dim sDocumentType As String = "Unknown"
            Select Case eDocumentType
                Case DocumentTypeEnum.kAssemblyDocumentObject
                    For Each a As Control In oform.GroupBox1.Controls
                        If TypeOf a Is Windows.Forms.TextBox Then
                            a.Text = Nothing
                        End If
                    Next
                    Dim odef As AssemblyComponentDefinition = odoc.componentdefinition
                    Dim occ As ComponentOccurrence
                    For Each occ In odef.Occurrences
                        If TypeOf occ.Definition Is AssemblyComponentDefinition Then
                            '              oForm.ComboBox1.Items.Add(occ.Name)
                        End If
                    Next

                    oform.TextBox1.Text = odef.Parameters.UserParameters.Item("height").Value * 10
                    oform.TextBox2.Text = odef.Parameters.UserParameters.Item("width").Value * 10
                    oform.TextBox3.Text = odef.Parameters.UserParameters.Item("depth").Value * 10
                    oform.TextBox4.Text = odef.Parameters.UserParameters.Item("front_bolt_qty").Value
                    oform.TextBox5.Text = odef.Parameters.UserParameters.Item("front_bolt_distance").Value * 10
                    oform.TextBox6.Text = odef.Parameters.UserParameters.Item("top_bottom_bolt_qty").Value
                    oform.TextBox7.Text = odef.Parameters.UserParameters.Item("top_bottom_bolt_distance").Value * 10
                    oform.GroupBox1.Text = odoc.PropertySets.Item("Design Tracking Properties").Item("Description").Value
                    For idx = 1 To oform.GroupBox1.Controls.Count
                        chb = oform.GroupBox1.Controls.Item(idx)
                        If odoc.PropertySets.Item("Inventor User Defined Properties").Item(oform.GroupBox1.Controls.Item(idx).Text).Value = "1" Then

                            chb.Checked = 1
                        Else
                            chb.Checked = 0
                        End If

                    Next

                    '  sDocumentType = "Assembly Document"
                    '      oForm.ComboBox1.Items.Clear()
                    ' oForm.TextBox1.Text = ""
              Case DocumentTypeEnum.kPartDocumentObject
                    sDocumentType = "Part Document"
                    Dim opdef As PartComponentDefinition = odoc.componentdefinition
                    For Each a As Control In oform.GroupBox1.Controls
                        If TypeOf a Is Windows.Forms.TextBox Then
                            a.Text = Nothing
                        End If
                    Next
                    oform.GroupBox1.Text = odoc.PropertySets.Item("Design Tracking Properties").Item("Description").Value

                    For idx = 1 To oform.GroupBox1.Controls.Count
                        chb = oform.GroupBox1.Controls.Item(idx)

                        If odoc.PropertySets.Item("Inventor User Defined Properties").Item(oform.GroupBox1.Controls.Item(idx).Text).Value = "1" Then

                            chb.Checked = 1
                        Else
                            chb.Checked = 0
                        End If

                    Next
                    oform.TextBox1.Text = opdef.Parameters.UserParameters.Item("height").Value * 10
                    oform.TextBox2.Text = opdef.Parameters.UserParameters.Item("width").Value * 10
                    oform.TextBox3.Text = opdef.Parameters.UserParameters.Item("depth").Value * 10
                    oform.TextBox4.Text = opdef.Parameters.UserParameters.Item("front_bolt_qty").Value
                    oform.TextBox5.Text = opdef.Parameters.UserParameters.Item("front_bolt_distance").Value * 10
                    oform.TextBox6.Text = opdef.Parameters.UserParameters.Item("top_bottom_bolt_qty").Value
                    oform.TextBox7.Text = opdef.Parameters.UserParameters.Item("top_bottom_bolt_distance").Value * 10

            End Select
     End Sub&lt;/PRE&gt;</description>
      <pubDate>Thu, 31 Oct 2019 13:33:22 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/how-to-add-a-usercontrol-or-userform-to-a-dockablewindow-in/m-p/9119766#M102652</guid>
      <dc:creator>marcin_otręba</dc:creator>
      <dc:date>2019-10-31T13:33:22Z</dc:date>
    </item>
    <item>
      <title>Re: How To Add a UserControl Or Userform to a DockableWindow in Inventor?</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/how-to-add-a-usercontrol-or-userform-to-a-dockablewindow-in/m-p/9119833#M102653</link>
      <description>&lt;P&gt;How to prevent the userform from scaling weird.&lt;/P&gt;&lt;P&gt;I am missing the buttons and the other controls on it because is scaled wierd...&lt;/P&gt;</description>
      <pubDate>Thu, 31 Oct 2019 14:01:30 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/how-to-add-a-usercontrol-or-userform-to-a-dockablewindow-in/m-p/9119833#M102653</guid>
      <dc:creator>bradeneuropeArthur</dc:creator>
      <dc:date>2019-10-31T14:01:30Z</dc:date>
    </item>
    <item>
      <title>Re: How To Add a UserControl Or Userform to a DockableWindow in Inventor?</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/how-to-add-a-usercontrol-or-userform-to-a-dockablewindow-in/m-p/9123125#M102713</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/473476"&gt;@bradeneuropeArthur&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;&lt;P&gt;Think that the UserControls are not modeless (showdialog), that is why it is not funcioning!&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;You can use UserControl also.&lt;/P&gt;&lt;P&gt;Following app which I made uses UserControl instead of Form. (See the video on the page)&lt;/P&gt;&lt;P&gt;&lt;A href="https://apps.autodesk.com/INVNTOR/en/Detail/Index?id=2638190254159513577&amp;amp;appLang=en&amp;amp;os=Win64" target="_blank" rel="noopener"&gt;https://apps.autodesk.com/INVNTOR/en/Detail/Index?id=2638190254159513577&amp;amp;appLang=en&amp;amp;os=Win64&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Keep mind that the dockable window with user control may have trouble about control keys such as 'Enter' or 'Tab'.&lt;/P&gt;&lt;P&gt;&lt;A href="https://forums.autodesk.com/t5/inventor-customization/dockable-window-with-user-control-is-not-catching-enter-key/td-p/6984591" target="_blank" rel="noopener"&gt;Dockable window with user control is not catching enter key press?&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I wrote the difference between Form and UserControl in the above thread.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;=====&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.freeradical.jp" target="_blank" rel="noopener"&gt;Freeradical&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;Hideo Yamada&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 02 Nov 2019 01:32:53 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/how-to-add-a-usercontrol-or-userform-to-a-dockablewindow-in/m-p/9123125#M102713</guid>
      <dc:creator>HideoYamada</dc:creator>
      <dc:date>2019-11-02T01:32:53Z</dc:date>
    </item>
    <item>
      <title>Re: How To Add a UserControl Or Userform to a DockableWindow in Inventor?</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/how-to-add-a-usercontrol-or-userform-to-a-dockablewindow-in/m-p/9123332#M102715</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/555733"&gt;@HideoYamada&lt;/a&gt;&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/1734991"&gt;@marcin_otręba&lt;/a&gt; ,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any idea how to be sure that the userform or the usercontrol scales to the Dockable window?&lt;/P&gt;&lt;P&gt;At the moment the Userform scales weird (to large) and does not fit the Dockable Window size.&lt;/P&gt;&lt;P&gt;I have set the userform to a fix height and now the buttons are visible, but is this the correct way of preventing the UserForm or UserControl from scaling?&lt;/P&gt;&lt;P&gt;What are the correct dimensions (Weight and Width) for the UserFrom or UserControl?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for the support on this,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 02 Nov 2019 07:35:20 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/how-to-add-a-usercontrol-or-userform-to-a-dockablewindow-in/m-p/9123332#M102715</guid>
      <dc:creator>bradeneuropeArthur</dc:creator>
      <dc:date>2019-11-02T07:35:20Z</dc:date>
    </item>
    <item>
      <title>Re: How To Add a UserControl Or Userform to a DockableWindow in Inventor?</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/how-to-add-a-usercontrol-or-userform-to-a-dockablewindow-in/m-p/9123438#M102719</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/473476"&gt;@bradeneuropeArthur&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;&lt;P&gt;Any idea how to be sure that the userform or the usercontrol scales to the Dockable window?&lt;/P&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;Are you saying that the content of your dockable window isn't resized when the dockable window is resized?&lt;/P&gt;&lt;P&gt;Try change the border style of userform or usercontrol to none.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;=====&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.freeradical.jp" target="_blank" rel="noopener"&gt;Freeradical&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;Hideo Yamada&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 02 Nov 2019 11:29:59 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/how-to-add-a-usercontrol-or-userform-to-a-dockablewindow-in/m-p/9123438#M102719</guid>
      <dc:creator>HideoYamada</dc:creator>
      <dc:date>2019-11-02T11:29:59Z</dc:date>
    </item>
    <item>
      <title>Re: How To Add a UserControl Or Userform to a DockableWindow in Inventor?</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/how-to-add-a-usercontrol-or-userform-to-a-dockablewindow-in/m-p/9123447#M102720</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;you can use dockablewindow.width and height to set up your form width and height onload, also you can use dockablewindow.SetMinimumSize functionality, i assume that in your form you have correct anchors and settings for its content.&lt;/P&gt;</description>
      <pubDate>Sat, 02 Nov 2019 11:43:52 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/how-to-add-a-usercontrol-or-userform-to-a-dockablewindow-in/m-p/9123447#M102720</guid>
      <dc:creator>marcin_otręba</dc:creator>
      <dc:date>2019-11-02T11:43:52Z</dc:date>
    </item>
    <item>
      <title>Re: How To Add a UserControl Or Userform to a DockableWindow in Inventor?</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/how-to-add-a-usercontrol-or-userform-to-a-dockablewindow-in/m-p/9123462#M102721</link>
      <description>&lt;P&gt;The UserForm or UserControl becomes to large in the Dockable window and the bottons are out of the field, you understand?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I need to take a look at the Anchors!!!&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/1734991"&gt;@marcin_otręba&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 02 Nov 2019 12:26:05 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/how-to-add-a-usercontrol-or-userform-to-a-dockablewindow-in/m-p/9123462#M102721</guid>
      <dc:creator>bradeneuropeArthur</dc:creator>
      <dc:date>2019-11-02T12:26:05Z</dc:date>
    </item>
    <item>
      <title>Re: How To Add a UserControl Or Userform to a DockableWindow in Inventor?</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/how-to-add-a-usercontrol-or-userform-to-a-dockablewindow-in/m-p/9124194#M102723</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;At what moment do you add the oForm to the DockableWindow?&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;on ActivateDocument?&lt;/LI&gt;&lt;LI&gt;on initialize the add in?&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;Can't get this to work since I cannot update the created form on activate document!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 03 Nov 2019 12:47:45 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/how-to-add-a-usercontrol-or-userform-to-a-dockablewindow-in/m-p/9124194#M102723</guid>
      <dc:creator>bradeneuropeArthur</dc:creator>
      <dc:date>2019-11-03T12:47:45Z</dc:date>
    </item>
    <item>
      <title>Re: How To Add a UserControl Or Userform to a DockableWindow in Inventor?</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/how-to-add-a-usercontrol-or-userform-to-a-dockablewindow-in/m-p/9125190#M102729</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;HR /&gt;The UserForm or UserControl becomes to large in the Dockable window and the bottons are out of the field, you understand?&lt;P&gt;I need to take a look at the Anchors!!!&amp;nbsp;&lt;A href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/1734991" target="_blank"&gt;@marcin_otręba&lt;/A&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;Yes i understand! also it would be nice if you could attach some scren showing your situation.&lt;/P&gt;&lt;P&gt;I always try to design my forms in size wchich they will appear. Also content should be achored to side in wchich dockable window will be docked.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;At what moment do you add the oForm to the DockableWindow?&lt;/P&gt;&lt;P&gt;I have it is couple of my addins and it is added :&lt;/P&gt;&lt;P&gt;1. on custom button click&lt;/P&gt;&lt;P&gt;2. as i showed in my first answer - on addtouserinterface:&lt;/P&gt;&lt;PRE&gt;    Private Sub AddToUserInterface()
            Dim addInCLS As GuidAttribute
            addInCLS = CType(System.Attribute.GetCustomAttribute(GetType(StandardAddInServer), GetType(GuidAttribute)), GuidAttribute)
            addInCLSIDString = "{" &amp;amp; addInCLS.Value &amp;amp; "}"
            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&lt;/PRE&gt;&lt;P&gt;3.on assembly doc activate.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can't get this to work since I cannot update the created form on activate document! - what do you mean?&lt;/P&gt;&lt;P&gt;if you dont want to shear on forum you can write me message or something, also if you could describe what you want to acomplish, i think i have alot of experience with dockable windows and i propably did it already. I use them almost on all possible document events.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 04 Nov 2019 09:57:56 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/how-to-add-a-usercontrol-or-userform-to-a-dockablewindow-in/m-p/9125190#M102729</guid>
      <dc:creator>marcin_otręba</dc:creator>
      <dc:date>2019-11-04T09:57:56Z</dc:date>
    </item>
    <item>
      <title>Re: How To Add a UserControl Or Userform to a DockableWindow in Inventor?</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/how-to-add-a-usercontrol-or-userform-to-a-dockablewindow-in/m-p/9125232#M102730</link>
      <description>&lt;P&gt;Thank you&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/1734991"&gt;@marcin_otręba&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I got it working.&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Step one is to declare the Userform as a &lt;STRONG&gt;Public new&lt;/STRONG&gt; form to the StandardAddInServer:&lt;/LI&gt;&lt;/UL&gt;&lt;PRE&gt;Public Class StandardAddInServer
        Implements Inventor.ApplicationAddInServer

        ' Inventor application object.
        Private m_inventorApplication As Inventor.Application
        Private m_ClientID As String
        &lt;STRONG&gt;Public m_Form As StartFormulier&lt;BR /&gt;&lt;/STRONG&gt;&lt;/PRE&gt;&lt;UL&gt;&lt;LI&gt;&amp;nbsp;Then on the document event I am the first time adding the userform to the DockableWindow:&lt;BR /&gt;&lt;PRE&gt;        Private Sub m_AppEvents_OnActivateDocument(ByVal DocumentObject As Inventor._Document,
                                                    ByVal BeforeOrAfter As Inventor.EventTimingEnum,
                                                     ByVal Context As Inventor.NameValueMap,
                                                    ByRef HandlingCode As Inventor.HandlingCodeEnum) Handles m_AppEvents.OnActivateDocument
            If BeforeOrAfter = EventTimingEnum.kAfter Then
                m_Form.Show()
                Dim docw As DockableWindow
                Try
                    &lt;STRONG&gt;docw = m_inventorApplication.UserInterfaceManager.DockableWindows.Add("1234xyz", "1234yyz", "My Dockabel Window")
                    docw.AddChild(m_Form.Handle.ToInt64)&lt;/STRONG&gt;
                
                Catch ex As Exception

                End Try&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;m_Form.Text = DocumentObject.DisplayName&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;m_form.....Etc Etc&lt;/STRONG&gt;&lt;/PRE&gt;Now I am able to access the m_form as I need.&lt;BR /&gt;The form is used to display and edit the Company mandatory I-properties.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any better suggestions from your side to accomplish this?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;</description>
      <pubDate>Mon, 04 Nov 2019 10:32:44 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/how-to-add-a-usercontrol-or-userform-to-a-dockablewindow-in/m-p/9125232#M102730</guid>
      <dc:creator>bradeneuropeArthur</dc:creator>
      <dc:date>2019-11-04T10:32:44Z</dc:date>
    </item>
    <item>
      <title>Re: How To Add a UserControl Or Userform to a DockableWindow in Inventor?</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/how-to-add-a-usercontrol-or-userform-to-a-dockablewindow-in/m-p/9125255#M102731</link>
      <description>&lt;P&gt;I did something like that, i used onactivatedocument(here i used ActiveEditDocument) and onpreselectevents - here i run code if selected entity was comp occurrence and count was =1&lt;/P&gt;</description>
      <pubDate>Mon, 04 Nov 2019 10:41:31 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/how-to-add-a-usercontrol-or-userform-to-a-dockablewindow-in/m-p/9125255#M102731</guid>
      <dc:creator>marcin_otręba</dc:creator>
      <dc:date>2019-11-04T10:41:31Z</dc:date>
    </item>
    <item>
      <title>Re: How To Add a UserControl Or Userform to a DockableWindow in Inventor?</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/how-to-add-a-usercontrol-or-userform-to-a-dockablewindow-in/m-p/9125790#M102737</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;A "fine tuning" question.&lt;/P&gt;&lt;P&gt;How to prevent the shown UserForm from being shortly visible in the inventor screen when the DockableWindow is created.&lt;/P&gt;&lt;P&gt;The Userform is very short visible before it is added to the Dockable window.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;</description>
      <pubDate>Mon, 04 Nov 2019 14:57:56 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/how-to-add-a-usercontrol-or-userform-to-a-dockablewindow-in/m-p/9125790#M102737</guid>
      <dc:creator>bradeneuropeArthur</dc:creator>
      <dc:date>2019-11-04T14:57:56Z</dc:date>
    </item>
  </channel>
</rss>

