Solved

Using VB.NET Treeview control in VB6

Posted on 2003-11-19
7
405 Views
Last Modified: 2010-05-01
Hi,

I need to use the VB.NET Treeview control in a VB6 application because the VB.NET Treeview control seems to be much faster the the VB6 one with a large amount of data.  My question is how to do it.

I read some articles about interop between .Net and VB6 and tried to subclass from System.Windows.Forms.TreeView in .Net and build either a COM class or User Control, and add the tlb file into VB6 Project References, and use a New to create a VB.Net treeview in VB6.  It didn't work when I call the New.  Is this approach ever going to work?  I don't know if you can add a control on a VB form by calling New.  I can't find a way to add the VB.Net tlb into Vb6 Project Componets.  Is this even possible??

If someone has done it before or know how, please share your thoughts.

Thanks a lot!
0
Comment
Question by:jayleno
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
7 Comments
 
LVL 15

Expert Comment

by:SRigney
ID: 9781511
It is possible for you to write your own controls in .Net and have them available for VB6 if you use the correct Attributes with the functions to enable COM functionality, however the .Net controls are not written to be used in VB6.  If the .Net control is faster for your situation, why don't you write the project in VB.Net and have it access any previous VB6 files that are needed?  This is the method that is supported by Microsoft.
0
 

Author Comment

by:jayleno
ID: 9781615
SRigney,

Can you elaberate on "use the correct Attributes with the functions to enable COM functionality"?  I cannot port the project to VB.NET because of the project size and time constraints.  So if you can be more specific on the steps to do it I would appreciate it.
0
 
LVL 15

Expert Comment

by:SRigney
ID: 9781724
Here is a link to MSDN where it talks about how to do it.  I haven't done anything like this myself.  I have opted to convert my applications to .Net as often as possible.  

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/html/cpconexposingnetframeworkcomponentstocom.asp
0
 

Author Comment

by:jayleno
ID: 10166897
Hi,

Since I did not find any acceptable answer here, I would like to close and delete this question.  I suppose the best thing to do when encountered with a problem like mine is to stick with VB6 (or VB.NET) and look for other facters to solve the problem.

THanks anyway.
0
 
LVL 1

Accepted Solution

by:
Computer101 earned 0 total points
ID: 10191293
PAQed, with points refunded (250)

Computer101
E-E Admin
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

749 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question