PC Review


Reply
Thread Tools Rate Thread

adding usercontrol to Toolbox

 
 
Nariban Barkan
Guest
Posts: n/a
 
      22nd Jun 2008
Hi All,
I have two custom usercontrols in my project but how can i use them on a
windows form ?
I can not see them on the toolbox and i can not drag and drop from Solution
Explorer ..

Thanks for your help,



 
Reply With Quote
 
 
 
 
Bob Powell [MVP]
Guest
Posts: n/a
 
      22nd Jun 2008
If the project has compiled successfully the user controls should appear in
the toolbox automatically.

If you want to build these user controls in a DLL and use them on a page in
another application then you will need to add them to the toolbox by
right-clicling the toolbox, select "Choose items..." and then browse to the
DLL containing your controls. Select it and then chose the controls you wish
to see.

--
--
Bob Powell [MVP]
Visual C#, System.Drawing

Ramuseco Limited .NET consulting
http://www.ramuseco.com

Find great Windows Forms articles in Windows Forms Tips and Tricks
http://www.bobpowell.net/tipstricks.htm

Answer those GDI+ questions with the GDI+ FAQ
http://www.bobpowell.net/faqmain.htm

All new articles provide code in C# and VB.NET.
Subscribe to the RSS feeds provided and never miss a new article.


"Nariban Barkan" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Hi All,
> I have two custom usercontrols in my project but how can i use them on a
> windows form ?
> I can not see them on the toolbox and i can not drag and drop from
> Solution Explorer ..
>
> Thanks for your help,
>
>
>


 
Reply With Quote
 
Phil Rogers
Guest
Posts: n/a
 
      9th Feb 2010
I created a user control. It compiles and builds a DLL successfully.
The control does not appear in the Toolbox.
If I right-click the Toolbox and select Choose Items... and browse for my DLL, it still doesn't appear in the Toolbox.

I have made a test program that adds an instance of the control dynamically and the control behaves exactly as I expect it to, so why can I not add it to the Toolbox?

This is in VS2005 team Edition for Software Developers.





Bob Powell [MVP] wrote:

If the project has compiled successfully the user controls should appear in
22-Jun-08

If the project has compiled successfully the user controls should appear in
the toolbox automatically.

If you want to build these user controls in a DLL and use them on a page in
another application then you will need to add them to the toolbox by
right-clicling the toolbox, select "Choose items..." and then browse to the
DLL containing your controls. Select it and then chose the controls you wish
to see.

--
--
Bob Powell [MVP]
Visual C#, System.Drawing

Ramuseco Limited .NET consulting
http://www.ramuseco.com

Find great Windows Forms articles in Windows Forms Tips and Tricks
http://www.bobpowell.net/tipstricks.htm

Answer those GDI+ questions with the GDI+ FAQ
http://www.bobpowell.net/faqmain.htm

All new articles provide code in C# and VB.NET.
Subscribe to the RSS feeds provided and never miss a new article.


"Nariban Barkan" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...

Previous Posts In This Thread:

On Sunday, June 22, 2008 6:56 AM
Nariban Barkan wrote:

adding usercontrol to Toolbox
Hi All,
I have two custom usercontrols in my project but how can i use them on a
windows form ?
I can not see them on the toolbox and i can not drag and drop from Solution
Explorer ..

Thanks for your help,

On Sunday, June 22, 2008 8:33 AM
Bob Powell [MVP] wrote:

If the project has compiled successfully the user controls should appear in
If the project has compiled successfully the user controls should appear in
the toolbox automatically.

If you want to build these user controls in a DLL and use them on a page in
another application then you will need to add them to the toolbox by
right-clicling the toolbox, select "Choose items..." and then browse to the
DLL containing your controls. Select it and then chose the controls you wish
to see.

--
--
Bob Powell [MVP]
Visual C#, System.Drawing

Ramuseco Limited .NET consulting
http://www.ramuseco.com

Find great Windows Forms articles in Windows Forms Tips and Tricks
http://www.bobpowell.net/tipstricks.htm

Answer those GDI+ questions with the GDI+ FAQ
http://www.bobpowell.net/faqmain.htm

All new articles provide code in C# and VB.NET.
Subscribe to the RSS feeds provided and never miss a new article.


"Nariban Barkan" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...


Submitted via EggHeadCafe - Software Developer Portal of Choice
Creating a WPF Custom Control
http://www.eggheadcafe.com/tutorials...ustom-con.aspx
 
Reply With Quote
 
mick
Guest
Posts: n/a
 
      9th Feb 2010
"Phil Rogers" wrote in message
news:(E-Mail Removed)...
>I created a user control. It compiles and builds a DLL successfully.
> The control does not appear in the Toolbox.
> If I right-click the Toolbox and select Choose Items... and browse for my
> DLL, it still doesn't appear in the Toolbox.
>
> I have made a test program that adds an instance of the control
> dynamically and the control behaves exactly as I expect it to, so why can
> I not add it to the Toolbox?
>
> This is in VS2005 team Edition for Software Developers.
>


Did you add a reference?

mick

 
Reply With Quote
 
Matthew Millington
Guest
Posts: n/a
 
      15th Oct 2010
Sorry for dragging up an old topic, but I was having a similar issue, but found an explanation.

Some of my custom controls did appear in the toolbox, but others didn't, it appears that the control will only be added to the toolbox if you specify a default (i.e. no argument) constructor.

> On Sunday, June 22, 2008 6:56 AM Nariban Barkan wrote:


> Hi All,
> I have two custom usercontrols in my project but how can i use them on a
> windows form ?
> I can not see them on the toolbox and i can not drag and drop from Solution
> Explorer ..
>
> Thanks for your help,



>> On Sunday, June 22, 2008 8:33 AM Bob Powell [MVP] wrote:


>> If the project has compiled successfully the user controls should appear in
>> the toolbox automatically.
>>
>> If you want to build these user controls in a DLL and use them on a page in
>> another application then you will need to add them to the toolbox by
>> right-clicling the toolbox, select "Choose items..." and then browse to the
>> DLL containing your controls. Select it and then chose the controls you wish
>> to see.
>>
>> --
>> --
>> Bob Powell [MVP]
>> Visual C#, System.Drawing
>>
>> Ramuseco Limited .NET consulting
>> http://www.ramuseco.com
>>
>> Find great Windows Forms articles in Windows Forms Tips and Tricks
>> http://www.bobpowell.net/tipstricks.htm
>>
>> Answer those GDI+ questions with the GDI+ FAQ
>> http://www.bobpowell.net/faqmain.htm
>>
>> All new articles provide code in C# and VB.NET.
>> Subscribe to the RSS feeds provided and never miss a new article.
>>
>>
>> "Nariban Barkan" <(E-Mail Removed)> wrote in message
>> news:(E-Mail Removed)...



>>> On Tuesday, February 09, 2010 7:06 AM Phil Rogers wrote:


>>> I created a user control. It compiles and builds a DLL successfully.
>>>
>>> The control does not appear in the Toolbox.
>>>
>>> If I right-click the Toolbox and select Choose Items... and browse for my DLL, it still doesn't appear in the Toolbox.
>>>
>>>
>>>
>>> I have made a test program that adds an instance of the control dynamically and the control behaves exactly as I expect it to, so why can I not add it to the Toolbox?
>>>
>>>
>>>
>>> This is in VS2005 team Edition for Software Developers.



>>> Submitted via EggHeadCafe - Software Developer Portal of Choice
>>> Freeze Row Group Header in WPF DataGrid
>>> http://www.eggheadcafe.com/tutorials...-datagrid.aspx

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Bad UserControl in Toolbox (VS 2003) Fabio Cannizzo Microsoft C# .NET 0 28th Dec 2005 06:25 PM
cant find UserControl in toolbox JR Microsoft VB .NET 0 30th Jun 2005 07:03 PM
toolbox and usercontrol problem steve bull Microsoft C# .NET 4 22nd Mar 2005 05:57 PM
New usercontrol not appearing in toolbox? Noozer Microsoft VB .NET 2 5th Jan 2005 08:28 PM
Toolbox missing my UserControl Saturnin Kepa Microsoft C# .NET 0 7th Jan 2004 08:59 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 03:55 AM.