Note that there are some explanatory texts on larger screens.

plurals
  1. PO.NET VS2005 WinForms: How do i drop a user control onto a form?
    primarykey
    data
    text
    <p>i've written a UserControl descendant that <strong>is</strong> in an assembly dll.</p> <p>How do i drop the control on a form?</p> <pre><code>namespace StackOverflowExample { public partial class MonthViewCalendar : UserControl { ... } } </code></pre> <p>i've added a reference to the assembly under the <strong>References</strong> node in the <strong>Solution Explorer</strong>, but no new control has appeared in my <strong>Toolbox</strong>.</p> <p>How do i make the control appear in the Toolbox so i can drop it on a form?</p> <hr> <p><strong>Update 1</strong>:</p> <p>i tried building the assembly while the Visual Studio option:</p> <p><strong>Tools</strong>--><strong>Options...</strong>--><strong>Windows Forms Designer</strong>--><strong>AutoToolboxPopulate</strong> = true</p> <p>The control didn't appear when in the toolbox in a new solution.</p> <p>Note: i somehow mistakenly wrote "...that is <em>not</em> in an assembly dll...". i don't know how i managed to write that, when it specifically <em>is</em> in an assembly dll. Controls have magically appeared when they're in the same project, but not now that it's a different project/solution.</p> <hr> <p><strong>Update 2: Answer</strong></p> <ol> <li>Right-click the <strong>Toolbox</strong></li> <li>Select <strong>Choose Items...</strong></li> <li><strong>.NET Framework Components</strong> tab</li> <li>Select <strong>Browse...</strong></li> <li><p>Browse to the <strong>assembly dll</strong> file that contains the control and select <strong>Open</strong></p> <p>Note: Controls in the assembly will silently be added to the list of .NET Framework Components.</p></li> <li><strong>Check</strong> each of the controls you wish to appear in the toolbox</li> <li>Select <strong>OK</strong></li> </ol>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload