Note that there are some explanatory texts on larger screens.

plurals
  1. POadding user control to toolbox using class Library
    primarykey
    data
    text
    <p>I have made those steps:</p> <ol> <li><p>Create a new Class Library project.</p></li> <li><p>Delete Class1.cs, initially provided with the application.</p></li> <li><p>Right click the project in the Solution Explorer and select Add > User Control…. In the dialog that appears, name the user-control file and click Add.</p></li> <li><p>Inside the project, add controls and functionality to the UserControl ( here I added 2 radiobuttons(Bold, Italic) and</p></li> </ol> <p>a label to change its text using radiobuttons)</p> <ol> <li><p>Build the project. Visual Studio creates a .dll file for the UserControl in the output directory (bin/Debug). </p></li> <li><p>Create a new Windows application.</p></li> <li><p>In the new Windows application, right click the ToolBox and select Choose Items…. In the Choose Toolbox Items dialog that appears, click Browse…. Browse for the .dll file from the class library created in Steps 1–5. The item will then appear in the Choose Toolbox Items dialog. If it is not already checked, check this item. Click OK to add the item to the Toolbox. This control can now be added to the Form as if it were any other control.</p></li> </ol> <hr> <p>when doing the 7th step I got an error</p> <p>"There are no components in "C:\Users.............\MyDLL.dll that can be placed on the toolbox"</p> <pre><code>namespace ClassLibrary1 { public partial class UserControl1 : UserControl { public UserControl1() { InitializeComponent(); } } } </code></pre> <p>what is the reason? please help...</p>
    singulars
    1. This table or related slice is empty.
    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.
 

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