Tech or Treat! Write an article about your scariest tech disaster to win gadgets!Learn more

x
?
Solved

Using VB.NET Treeview control in VB6

Posted on 2003-11-19
7
Medium Priority
?
410 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

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

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

The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
Suggested Courses

647 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