473,395 Members | 2,467 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,395 software developers and data experts.

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 programmatically as detailed below".

Which brings me to my question...I don't want to add the control
programmatically. 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 1506
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*********@verizon.net> wrote in message
news:1gvNd.6906$uc.3816@trnddc02...
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 programmatically as detailed below".

Which brings me to my question...I don't want to add the control
programmatically. 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"...but 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*********@verizon.net> wrote in message
news:pNyNd.7665$uc.1081@trnddc04...
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"...but 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 MyCompanySupport.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*********@verizon.net> wrote in message
news:pNyNd.7665$uc.1081@trnddc04...
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"...but 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
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>...
5
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...
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...
2
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...
10
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....
3
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...
4
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...
5
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...
11
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...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
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.