locked
Failed to load toolbox item 'controle name' it will be removed from the toolbox. RRS feed

  • Question

  • hi

    I have created a User control and compiled the solution.

    After compilation in Tool Box, that control is comming.

    But when I drag drop to the form, its showing error message: "Failed to load toolbox item 'controle name' it will be removed from the toolbox. "

    ... and now it will be removed from the ToolBox too.

    What is the problem or what is the solution?



    Regards
    Abinash
    Wednesday, September 2, 2009 5:09 PM

Answers

  • Hi Abinash,

    You have to create an instance of user control.

    suppose you have usercontrol1.cs with same namespace in your project.

    add this code in you form where you want to use usercontrol.

    UserControl1 ob = new UserControl1();
    ob.Bounds = new Rectangle(10, 10, 50, 50);
    this.Controls.Add(ob);
    

    Note : this the sample code.

    Hope this may be help

    If you find my post is helpful for you then mark as a answer.
    • Marked as answer by ZHE ZHAO Wednesday, September 9, 2009 2:19 AM
    Wednesday, September 2, 2009 5:19 PM
  • Hi Abinash,

    Try to add the applcation exe file to your tool box.

    Right click --> Choose Items --> and select the exe from there.


    You can find your user control in the tool box items. Hope this helps you.


    Regards,
    Malleswar


    • Marked as answer by ZHE ZHAO Wednesday, September 9, 2009 2:19 AM
    Wednesday, September 2, 2009 5:24 PM

All replies

  • Hi Abinash,

    You have to create an instance of user control.

    suppose you have usercontrol1.cs with same namespace in your project.

    add this code in you form where you want to use usercontrol.

    UserControl1 ob = new UserControl1();
    ob.Bounds = new Rectangle(10, 10, 50, 50);
    this.Controls.Add(ob);
    

    Note : this the sample code.

    Hope this may be help

    If you find my post is helpful for you then mark as a answer.
    • Marked as answer by ZHE ZHAO Wednesday, September 9, 2009 2:19 AM
    Wednesday, September 2, 2009 5:19 PM
  • Hi Abinash,

    Try to add the applcation exe file to your tool box.

    Right click --> Choose Items --> and select the exe from there.


    You can find your user control in the tool box items. Hope this helps you.


    Regards,
    Malleswar


    • Marked as answer by ZHE ZHAO Wednesday, September 9, 2009 2:19 AM
    Wednesday, September 2, 2009 5:24 PM
  • check weather the DLL where the user control is written is registered in the GAC if it is already installed then uninstall the same from GAC and re install this should work.
    Approach is what matters.
    • Proposed as answer by dev02 Friday, June 18, 2010 3:56 AM
    Friday, September 11, 2009 8:03 AM