473,407 Members | 2,312 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,407 software developers and data experts.

Adding component to toolbox

Hi,
I have added a component class that inherits System.windows.Forms.TextBox.
This component is in the same project as my windows application
(executable).
I could instantiate it and add to form's controls collection but I want to
know that if it is possible to add it to the toolbox like if this component
was in separate project in this solution.
Thanks in advance.
Amin
Nov 21 '05 #1
4 8226
Hi Amin
yes you still can use it as long as you can add reference to in the
project you are working with . In your case for example (where it is in the
same solution as the other project), you add reference to if by selecting
the "existing project tab" of the add reference three tabs, then you
select the project that has your component.
if your component however is not in the same solution you need to locate
the component assembly and then add its reference to the project that will
use the control . One thing you can do is to build the assembly of the
control with a strong name then use the global assembly utility to install
it in your in the GAC . then when you create a new project that you want to
use your component in . you just add reference to the component assembly
that will now you can find in the global assembly tab

Mohamed Mahfouz
MEA Developer Support Center
ITworx on behalf of Microsoft EMEA GTSC

Nov 21 '05 #2
Hi Mohamed,
My solution has one project. The component and the consumer form are in the
same project. My component is something like this:

Public Class Test
Inherits System.Windows.Form.Control
End Class

In my form, I create a new instance of 'Test' programmatically and add it to
form's controls collection. But I want to have this control (component) in
the toolbox.
Thanks,
Amin
"Mohamoss" <mo************@egdsc.microsoft.com> wrote in message
news:Ti**************@cpmsftngxa06.phx.gbl...
Hi Amin
yes you still can use it as long as you can add reference to in the
project you are working with . In your case for example (where it is in the same solution as the other project), you add reference to if by selecting
the "existing project tab" of the add reference three tabs, then you
select the project that has your component.
if your component however is not in the same solution you need to locate
the component assembly and then add its reference to the project that will use the control . One thing you can do is to build the assembly of the
control with a strong name then use the global assembly utility to install it in your in the GAC . then when you create a new project that you want to use your component in . you just add reference to the component assembly
that will now you can find in the global assembly tab

Mohamed Mahfouz
MEA Developer Support Center
ITworx on behalf of Microsoft EMEA GTSC

Nov 21 '05 #3
> form's controls collection. But I want to have this control (component) in
the toolbox.


Right click on the toolbox and choose Add/Remove components. Then browse
to your .dll and it will appear in the toolbox
--
Chris

dunawayc[AT]sbcglobal_lunchmeat_[DOT]net

To send me an E-mail, remove the "[", "]", underscores ,lunchmeat, and
replace certain words in my E-Mail address.
Nov 21 '05 #4
Tom
Won't this cause VS to Lock the dll next time it builds?

Chris Dunaway <"dunawayc[[at]_lunchmeat_sbcglobal[dot]]net"> wrote in message news:<70*****************************@40tude.net>. ..
form's controls collection. But I want to have this control (component) in
the toolbox.


Right click on the toolbox and choose Add/Remove components. Then browse
to your .dll and it will appear in the toolbox

Nov 21 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Fred Chen | last post by:
Hi, I've created a custom component and I am trying to add this component to my toolbox through an installer. I've read previous posts and msdn documentation on using the DTE object and the...
6
by: TnCoder | last post by:
Hi; I just moved from vb 6.0 to vb.net. I am trying to add MS Calendar control to my toolbox. After the control is added, it is not enabled. Is there dll I have to add? Can anyone who could give...
2
by: Chien Lau | last post by:
I frequently define internal UserControl-derived classes in my WinForms apps: internal class MyUserControl:UserControl{ ... } I'll often need to embed these controls in a Form, whose class...
4
by: Keith Smith | last post by:
I am reading this article... http://www.codeproject.com/cs/combobox/csautocomplete.asp About half-way down you will see a section titled "Using This Control" (written in orange lettering). ...
1
by: Lauchlan M | last post by:
Hi. I followed the steps suggested below . . . Say I created my component in the namespace "cld.aspnet.components" - where (filepath) would I look for the dll to add in to the toolbox, and...
6
by: cpnet | last post by:
I've authored a custom web component (a non-ui component kinda like a DataSet) and so far it's working. When my web component is added to the web form in the designer from the toolbox, the...
1
by: Jedufa | last post by:
following of thread: "Adding namespaces to code behind automatically" Hello, I had quite the same problem and got further in the right direction with your suggestions, thanks. Nevertheless, I...
2
by: alberthung01 | last post by:
Hi all, I wrote a component with ComponentDesigner to let users drag and drop it to WebPage from toolbox directly. Just like the behavior of dataAdapter. But it works fine on ASP.NET 1.1 but not...
18
by: MyMarlboro | last post by:
Hi, How to add existing component to toolbox? i right click my project say AAA and choose the existing component say ABC.cs and then i click ok. then ABC.cs is added to my project. But when i view...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.