473,386 Members | 1,699 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,386 software developers and data experts.

Q: Collection Classes

Morning group,

I am relatively new to VB.NET programming and have a question that I hope
this group can help me with.

I am putting together a VB.NET component that will be accessed through
collections and objects, like the VB6 treeview and/or listview. The
component will be created as a COM class and exposed to VB6.

With VB6, we add nodes to the treeview with the following code:
Dim nodEnter as Node

Set nodEnter = Treeview1.Nodes.Add (...)

If I am wanting to program similar functions in VB.NET, how exactly would
this work? I current have my object and collection objects ... let's call
them Widget (object) and Widgets (collection). The Add method is part of the
collection. What do I need in the object class so that in VB6, I can include
the following:
Dim wid as Widget

Set wid = Widgets.Add (...)

Thanks for any assistance you can offer.
Richard

Feb 6 '07 #1
1 1102
In article <EA**********************************@microsoft.co m>,
Ri******@discussions.microsoft.com says...
Morning group,

I am relatively new to VB.NET programming and have a question that I hope
this group can help me with.

I am putting together a VB.NET component that will be accessed through
collections and objects, like the VB6 treeview and/or listview. The
component will be created as a COM class and exposed to VB6.

With VB6, we add nodes to the treeview with the following code:
Dim nodEnter as Node

Set nodEnter = Treeview1.Nodes.Add (...)

If I am wanting to program similar functions in VB.NET, how exactly would
this work? I current have my object and collection objects ... let's call
them Widget (object) and Widgets (collection). The Add method is part of the
collection. What do I need in the object class so that in VB6, I can include
the following:
Dim wid as Widget

Set wid = Widgets.Add (...)
Exposing an object for COM interop is not a trivial thing. It takes a
bit of upfront planning in terms of interfaces and attributes. I've
written a couple of articles on COM interop that should answer many of
your questions. See:

http://www.15seconds.com/issue/040721.htm
http://www.15seconds.com/issue/060309.htm

--
Patrick Steele
http://weblogs.asp.net/psteele
Feb 6 '07 #2

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

Similar topics

24
by: downwitch | last post by:
Hi, I know this has been covered here and in the .public groups, but it seems like it's been a while, especially around here, so I just thought I'd ask again to see if anyone has figured out a...
11
by: Pavils Jurjans | last post by:
Hello, There's some confusion about the purpose and difference between these handy classes... First, both of them are holding number of key - value pairs, right? Then, I see that there may be...
2
by: Robert W. | last post by:
I'm trying to write a utility that will use Reflection to examine any data model I pass it and correctly map out this model into a tree structure. When I say "any" , in fact there will only be 3...
2
by: Edward Diener | last post by:
In C++ an overridden virtual function in a derived class must have the exact same signature of the function which is overridden in the base class, except for the return type which may return a...
2
by: Brian | last post by:
NOTE ALSO POSTED IN microsoft.public.dotnet.framework.aspnet.buildingcontrols I have solved most of my Server Control Collection property issues. I wrote an HTML page that describes all of the...
16
by: Ben Hannon | last post by:
Hi, I'm writting a COM Class in VB.NET to be used in a VB6 project (Tired of the VB6 hassles with cloning and serializing an object). All my classes I need cloneable/serializable are now in a...
4
by: Andrew | last post by:
I need to have a series of collection classes that inherit (I think) from each other. What is the best way to do this in .NET? In VB6 I had a series of collection classes each passing a reference...
3
by: Dave | last post by:
Please - anyone that can help. I am getting confusing results while trying to expose a collection from a web service. I have a webservice in which a web method accepts a collection as a...
19
by: Jamey Shuemaker | last post by:
I'm in the process of expanding my knowledge and use of Class Modules. I've perused MSDN and this and other sites, and I'm pretty comfortable with my understanding of Class Modules with the...
7
by: =?Utf-8?B?Q29kZVJhem9y?= | last post by:
Can someone explain a few things about collections to me. In C# 2 generics, you can create a collection class by inheriting from System.Collections.ObjectModel.Collection. Using this you can...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
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...

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.