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

Home Posts Topics Members FAQ

Help adding a component

I am reading this article...

http://www.codeproject.com/cs/combob...tocomplete.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 programmaticall y as detailed below".

Which brings me to my question...I don't want to add the control
programmaticall y. How do you do it using the designer? Normally I would
drag it from the toolbar on the left, but in this case (I guess because it
is a custom control) it is not there.

Thanks!
Nov 16 '05 #1
4 1526
RCS
If you right-click inside the Toolbox (where the textbox, combobox, etc
are) - there is a menu item "Choose items..." - choose that, and find the
DLL that has your controls - that will load it into the "Toolbox"..

"Keith Smith" <ke*********@ve rizon.net> wrote in message
news:1gvNd.6906 $uc.3816@trnddc 02...
I am reading this article...

http://www.codeproject.com/cs/combob...tocomplete.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 programmaticall y as detailed below".

Which brings me to my question...I don't want to add the control
programmaticall y. How do you do it using the designer? Normally I would
drag it from the toolbar on the left, but in this case (I guess because it
is a custom control) it is not there.

Thanks!

Nov 16 '05 #2
> If you right-click inside the Toolbox (where the textbox, combobox, etc
are) - there is a menu item "Choose items..." - choose that, and find the
DLL that has your controls - that will load it into the "Toolbox"..


Oh, I think I see. Mine is actually a little different than you are
describing. Mine has "Add/Remove Components"...b ut either way it does let
me browse for a DLL file.

So, then in order to use the code I have pasted I would need to put the code
in a DLL? Could you take me through those steps? Unless it is to
time-consuming to type here then maybe you could point me to a good link?
Nov 16 '05 #3
RCS

"Keith Smith" <ke*********@ve rizon.net> wrote in message
news:pNyNd.7665 $uc.1081@trnddc 04...
If you right-click inside the Toolbox (where the textbox, combobox, etc
are) - there is a menu item "Choose items..." - choose that, and find the
DLL that has your controls - that will load it into the "Toolbox"..


Oh, I think I see. Mine is actually a little different than you are
describing. Mine has "Add/Remove Components"...b ut either way it does let
me browse for a DLL file.

So, then in order to use the code I have pasted I would need to put the
code in a DLL? Could you take me through those steps? Unless it is to
time-consuming to type here then maybe you could point me to a good link?

Nov 16 '05 #4
RCS
Yeah, that's right - I've been using 2005 beta for a while and am already
used to that!

OK, basically, you just need to make a class library, or anything that
compiles to a DLL. But you can also create a new project file and create a
"Windows Control Library", all that does is make the project type a dll and
auto-adds a starter "User Control".

If you're familiar with old-school stuff, with ActiveX controls - you needed
to compile an OCX that would have your controls within it. In the new world,
you can put controls in ANY dll. So that means you could have a support dll
that has some business logic like say MyCompanySuppor t.dll - you could also
put windows controls in that dll. you don't need to have a seperate file for
that.

To work backwards, when you right-click and choose "Add/Remove components",
and when you browse for a your DLL, when you click OK - it scans that dll
you chose and sees if there are any windows controls it can load from it.
So how do "make" a windows control? Well you can either extend an existing
control by inheriting from it. Try that by creating a new class (just an
empty, regular class - normally called "Class1"). Then change:

public class Class1

to be

public class Class1 : System.Windows. Forms.ComboBox

Now, you will have an addable component called "Class1" that will look/act
just like a combo box.

To make your own control (again, the same concept as an old-school ActiveX
control) - right-click on your project and add a new class, but choose "User
Control". Draw whatever you need to on that, and again - once compiled, that
will show up as an icon in the toolbox.
Hope that helps..

"Keith Smith" <ke*********@ve rizon.net> wrote in message
news:pNyNd.7665 $uc.1081@trnddc 04...
If you right-click inside the Toolbox (where the textbox, combobox, etc
are) - there is a menu item "Choose items..." - choose that, and find the
DLL that has your controls - that will load it into the "Toolbox"..


Oh, I think I see. Mine is actually a little different than you are
describing. Mine has "Add/Remove Components"...b ut either way it does let
me browse for a DLL file.

So, then in order to use the code I have pasted I would need to put the
code in a DLL? Could you take me through those steps? Unless it is to
time-consuming to type here then maybe you could point me to a good link?

Nov 16 '05 #5

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

Similar topics

2
6153
by: David Williams | last post by:
I have a simple XML file that I have been using: <component name="test"> <class name="class"/> <component> Up till now, the Xpath of "//component/class" worked well to select the <class> tag. Recently we added a namespace to the <component> tag:
5
2388
by: MFC | last post by:
Ok, after three C# books, (C# How to Program, Programming in the Key of C#, and C# Weekend Crash Course) and three weeks, I believe I have tried everything to make a certain form function correctly. I am trying to learn C# after playing around for a bit with procedural programming with PHP, not OOP, and believe I have learned quite a bit in three weeks, just not enough to accomplish this one task. If anyone has a bit of free time and...
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...
2
7239
by: devendra pardeshi | last post by:
hi friends/seniors i am stuck on one problem in VB 6.0 and need solution. see if u can help me. first i describe the problem. Can u imagin the WinZip scenario. we right click on some file and select in context menu add to zip.Now if winzip is not runnig allready new instance of winzip application begins and
10
3678
by: One Handed Man [ OHM ] | last post by:
If this is duplicated, I'm sorry because I cant find the original post I made today Anyway . . Now its my turn to ask a question I want to develop an app which will run in the system tray. How can I do this?
3
2057
by: dencdr | last post by:
Hi, I have an application VB.NET (using Form Win32) with no icon in TaskBar. When a FORM of this application is visible I see this application in the list of "Alt+Tab" choice. How do for this application does not appear in this list when a FORM is visible ?
4
8248
by: Amin Sobati | last post by:
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
5
2871
by: Andrew | last post by:
Hey all, Requesting help from the VB.Net gurus in here. I was given a task to write a Windows Service (VB.Net) that would run an external program, and if that program closed for any reason (other than the service being stopped) it would restart it. I have written the service to do just this, and for testing purposes I am running the program Notepad. And I even have it making entries in the System Event Log. However, and this is my...
11
3385
by: Peted | last post by:
Im using c# 2005 express edition Ive pretty much finished an winforms application and i need to significantly improve the visual appeal of the interface. Im totaly stuck on this and cant seem to work out how to start on a solution. I have of course used a varienty of componets, mostly radio buttons with "button" appearence.
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
9257
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
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
4784
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
2635
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2157
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.