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

Component or Class

When you go to the Add New Item Dialog box in VB.Net, you're given the option
of adding a Class or a Component Class.

Exactly when should you use each of them?
Jul 21 '05 #1
2 1131
John,

The component is a kind of wizard as the form is. It creates a class that
inherits from Components. The Idisposable part is created and you get a
grid, on which you can drag components as dataadapterwizard, dataset etc.

A class is complete empty.

So when you want to use those components as datagrid with the designer, than
you can use the component. As well it is usefull when you want to add
unmanaged resources to your class.

I hope this helps,

Cor
Jul 21 '05 #2
On Wed, 6 Apr 2005 13:41:50 +0200, "Cor Ligthert" <no************@planet.nl>
wrote:
John,

The component is a kind of wizard as the form is. It creates a class that
inherits from Components. The Idisposable part is created and you get a
grid, on which you can drag components as dataadapterwizard, dataset etc.

A class is complete empty.

So when you want to use those components as datagrid with the designer, than
you can use the component. As well it is usefull when you want to add
unmanaged resources to your class.

I hope this helps,

Cor


Thanks for the words Cor. I hadn't considered using a component for interfacing
with unmanaged dll's. That seems to me a good idea.
Otis Mukinfus
http://www.otismukinfus.com
Jul 21 '05 #3

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

Similar topics

2
by: brazilnut52 | last post by:
I am going to outline the steps I go through to produce the problem. Hopefully this will help you understand the problem better I have created a simple COM DLL in .NET by using the COM class...
4
by: orangepic333 | last post by:
Could someone tell me what's the difference between the two? Is it that a class is used within an OO language while a component can be exported between OO languages? Are there other...
2
by: Edward Diener | last post by:
How does one specify in a component that a property is a pointer to another component ? How is this different from a property that is actually an embedded component ? Finally how is one notified in...
0
by: Jordan Bowness | last post by:
I make a similar post in another newsgroup, but this example is simplified somewhat. I have a component (cmpMyComponent) with 2 properties. The 1st property is a string value (Description) and...
2
by: AMDRIT | last post by:
Hello everyone, I have created a custom component and one of its properties is a class object with it's own properties. During runtime, I can assign values to the class object properties just...
122
by: Edward Diener No Spam | last post by:
The definition of a component model I use below is a class which allows properties, methods, and events in a structured way which can be recognized, usually through some form of introspection...
7
by: Joe | last post by:
Is it possible to have a component which is global to the entire application? I need to have a single component act sort of like a server which components in any of the forms can access. For...
1
by: gary.bernstein | last post by:
Any idea why line 57 fails? http://rafb.net/p/86JdGg61.html gs = MyShutdown<Component, T1, T2, T3>(this); Errors: shutdown1.cpp: In constructor `Component<T1, T2, T3>::Component(int)':...
0
by: bharathreddy | last post by:
In .Net COM+ components are referred to as serviced components, Namespace: System.EnterpriseServices; Advantage of Serviced Components: object pooling, database connection pooling,
5
by: Krice | last post by:
There is a component class inside the host class: class Host { Component *c; .... In some cases Component needs to call the host and I guess the only way is that you pass the host for it:
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

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.