How to add a customised control into toolbox?

Locked How to add a customised control into toolbox?

  • Wednesday, May 09, 2012 2:54 AM
     
     

    Hi,

    I created a DataGrid class that inherits from datagridview.
    public class DataGrid : DataGridView
    {
        …
    }

    Question is how can I add this control into toolbox? I am using vs2010, c# win form.

    Thank you.

    
    

All Replies

  • Wednesday, May 09, 2012 3:01 AM
     
     

    Can you check-out below walkthrough

    http://msdn.microsoft.com/en-us/library/ee712572.aspx


    Regards,
    Ahmed Ibrahim
    SQL Server Setup Team
    This posting is provided "AS IS" with no warranties, and confers no rights. Please remember to click "Mark as Answer" and "Vote as Helpful" on posts that help you.
    This can be beneficial to other community members reading the thread.

  • Wednesday, May 09, 2012 3:24 AM
     
     Answered

    Hi peter9

    if the project includes your custom DataGrid control be in the same solution that would use the Custom Control,

    if you build the solution ,vs would add any custom controls you desgin to the toolbox,so you can drag the control from toolbox to designer as the general controls .net frameworks provides.

    otherwise, you just only have .dll assembly file include the Custom DataGrid control you wanted. you can Right Click the ToolBox .and the click the Context Menu Item named Choose Item... ,

    and then browse to the .dll assmbly file, so any controls in the assembly would be add to the toolbox.

    have a nice day. 


    DON'T TRY SO HARD,THE BEST THINGS COME WHEN YOU LEAST EXPECT THEM TO.


    • Edited by Matthew LIN Wednesday, May 09, 2012 3:24 AM
    • Marked As Answer by peter 9 Wednesday, May 09, 2012 6:16 AM
    •