473,725 Members | 2,032 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 8247
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' programmaticall y and add it to
form's controls collection. But I want to have this control (component) in
the toolbox.
Thanks,
Amin
"Mohamoss" <mo************ @egdsc.microsof t.com> wrote in message
news:Ti******** ******@cpmsftng xa06.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_lunch meat_[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_sbcg lobal[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
2423
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 various ToolBox collections within. I've been able to create a new ToolBoxTab but I am not able to add any items to this tab.
6
467
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 me a step-by-step on how to add this control? All help would be appreciated.
2
6805
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 is contained in the same assembly as the control. As far as I know, the only way to do this using the designer is to add the UserControl-derived object
4
1526
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). Underneath that it says "Use this control in the same manner as you would a regular System.Windows.Forms.ComboBox. Add it to your form, via the designer or programmatically as detailed below".
1
1725
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 what would be called? Visual Studio.NET has too many places where this file could be - somewhere in my INETPUB, somewhere in the visual studio cache, etc etc. If I know what
6
3372
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 namespace for my component is automatically added to the using directive of the codebehind. And, the appropriate assembly is added to the "References" for the Web form's project. However, my custom component has a field (initialized to null, and...
1
2407
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 have a newer problem which seems to come from the fact that the assembly which contains my "SimpleComponentToolboxItem" must be already referenced
2
3123
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 on ASP.NET 2.0. Sometimes I add it to toolbox in VS2005 WebSite Project but it will not appear. And always it can't be drag and drop to WebPage any more. Nothing will be added to page after that.
18
6529
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 the Toolbox on my left, i can't find the ABC component appear in the toolbox list? i am using Visual C# 2008 Please guide. Thanks.
0
8888
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8752
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9401
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9111
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6702
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6011
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4517
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4782
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3221
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

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.