As Rumen said, adding controls to Visual Studio toolbox can be a tedious procedure. That's why r.a.d.controls are automatically added in the toolbox during installation. This makes it easier for the developer to start using them. However there is a catch - no control is added in Visual Studio 2005... Our toolbox adding code runs without an error but ... nothing happens. Several months ago I found the following forum thread which basically said that the code used to add toolbox items in Visual Studio 2003 will simply not work in Visual Studio 2005. And it is 100% right! We decided to abandon this task and continue with our lives.
In more recent times I came upon the following blog post which looked promising. I downloaded the sample code and ran a couple of tests. And it worked!!! No, it worked only when Visual Studio 2005 had been started beforehand... I instantly imagined the following dialog box "Dear customer, please start your Visual Studio 2005, so we can install our components in your toolbox. Would you?". Yeah, a very bad idea. Once again adding to Visual Studio 2005 was abandoned for better times.
A few days ago Stoyan brought the following blog post to my attention. The code described there is quite similar to the one we used to add controls to Visual Studio 2003 toolbox but actually works!!! Yes there are ugly COM-ish artefacts:
private static extern int CoRegisterMessageFilter(IOleMessageFilter newFilter, out IOleMessageFilter oldFilter);
It works and I don't care.
So to summarize:
- To add toolbox items in Visual Studio 2003 you can use the code frome here
- To add toolbox items in Visual Studio 2005 you should use the code from here