|
-
Oct 28th, 2004, 10:08 AM
#1
Thread Starter
Frenzied Member
Components
I have a component (class library) project in vb.net.
I added a new project to the solution and added a reference to the component.
Now, I want to be able to add that component onto a form so that it will appear in the panel beneath the form. Just like when you add a ado.net connection control.
How do I do that????? I thought it would appear in the toolbox but it doesn't.
Don't anthropomorphize computers -- they hate it
-
Oct 28th, 2004, 10:10 AM
#2
right click on the toolbox. Select Customize Toolbox.
-
Oct 28th, 2004, 10:21 AM
#3
Thread Starter
Frenzied Member
I don't see customize toolbox. I only have add/remove items.
That is what's odd to me. Shouldn't that component appear in the add/remove window?
Don't anthropomorphize computers -- they hate it
-
Oct 28th, 2004, 10:25 AM
#4
What version of Visual Studio are you using?
-
Oct 28th, 2004, 10:25 AM
#5
Thread Starter
Frenzied Member
Don't anthropomorphize computers -- they hate it
-
Oct 28th, 2004, 10:27 AM
#6
I guess thay may have changed it then. so I have no clue.
-
Oct 28th, 2004, 10:35 AM
#7
Did you browse for your dll in the Add/Remove dialog? Or are you expecting it to just show up? Most of the time I have found that I need to point to the dll and then the controls show up.
Laugh, and the world laughs with you. Cry, and you just water down your vodka.
Take credit, not responsibility
-
Oct 28th, 2004, 10:37 AM
#8
Thread Starter
Frenzied Member
Yeah, I know that problem. I'm referencing a project though. I have the container project along with the tester in teh same solution for debugging purposes.
Don't anthropomorphize computers -- they hate it
-
Oct 28th, 2004, 10:42 AM
#9
so what you are saying is your usercontrol is not a design time on the form user control, but more like a tooltip control, or contextmenu control?
i noticed you said class library... is it? or is it a control library?
-
Oct 28th, 2004, 10:43 AM
#10
Thread Starter
Frenzied Member
it's a component class library as it includes a timer.
I want it to add as a component to my tester project.
Don't anthropomorphize computers -- they hate it
-
Oct 28th, 2004, 10:45 AM
#11
sorry maybe im just totally confused... if you go to new project, did you pick "Class Library" or "Windows Control Library"
I don't see any "component class library"
-
Oct 28th, 2004, 10:46 AM
#12
Thread Starter
Frenzied Member
sorry, it's a class library.
Don't anthropomorphize computers -- they hate it
-
Oct 28th, 2004, 10:51 AM
#13
im not positive, but to get it to show up in the components, or toolbox, it needs to actually contain a component in it... or be a control library, if it is just a class, you can't add it there
-
Oct 28th, 2004, 10:51 AM
#14
Thread Starter
Frenzied Member
But it does. The class contains a timer component.
Don't anthropomorphize computers -- they hate it
-
Oct 28th, 2004, 10:53 AM
#15
Oh I think I get it now. The problem isnt that you cant add a compiled component to the toolbox, its you cant add a component project to it like you can with REferences right?
-
Oct 28th, 2004, 10:55 AM
#16
Thread Starter
Frenzied Member
I'm not sure I know what you mean.
I have the class library with a timer in it.
I have added another project to the solution and referenced the class library project in the new project.
I can create the object in code no problem.
I want to be able to include it in the testing app as a component.
Hope that clears things up a bit more.
Thanks,
Don't anthropomorphize computers -- they hate it
-
Oct 28th, 2004, 11:00 AM
#17
The class has to inherit ComponentModel.Component and then be added to toolbox.
-
Oct 28th, 2004, 11:01 AM
#18
-
Oct 28th, 2004, 11:04 AM
#19
Thread Starter
Frenzied Member
This is the heading of the class
VB Code:
Public Class FootPedal
Inherits System.ComponentModel.Component
''this is more down where the timer code is
Private components As System.ComponentModel.IContainer
Friend WithEvents tmrPortQuery As System.Windows.Forms.Timer
' ===================================
' Interval merely sets and returns the tmrPortQuery.Interval
' property.
' ===================================
<DefaultValue(100), _
Description("Automated polling interval."), _
Category("Behavior")> _
Public Property Interval() As Integer
Don't anthropomorphize computers -- they hate it
-
Oct 28th, 2004, 11:07 AM
#20
Then compile it and use the Add/REmove for the toolbox then you can drag it onto the form.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|