Solved

How do you set up an application using visual basic 6 and vb.net and vb

Posted on 2002-06-03
6
144 Views
Last Modified: 2013-11-25
How do you (can you?) set up an project using visual basic 6 modules and visual basic.net components in the same application.

(I am new to vb.net!!!)

Help would be appreciated because I have a large project in visual basic 6, but I want to start using vb.net for some database access components.

David
0
Comment
Question by:DrD
[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
6 Comments
 
LVL 2

Expert Comment

by:ventond
ID: 7053039
If I understand what you want correctly....

You have some code modules (*.bas) that you VB6 projects use. You want to use these in some .NET projects. As far as I know, .NET will not do so. You can have .NET convert them to .NET files. Then you will have two versions.

I have read that VB6 can call .NET DLL's and .NET can call VB6 DLL's. I don't know if it's true or not. If it is then you could compile your modules into DLL's and then call them from .NET and VB6.

I believe Visual Studio Magazine had an article about that in the last couple of months.
0
 
LVL 4

Expert Comment

by:Monchanger
ID: 7053110
I don't understand your meaning either, please try to explain exacly what you need.

If your application is long-term why don't you just move your whole app to .NET? Microsoft will decide to kill the VB6 runtime by not allowing it to run on the next versions of windows.
Last time I played with NET (I believe that was Beta 2 or so), there was a wizard which converts your entire project. Sure, you'd have to go over your code, but as long as your client needs the framework for those data access components, why not have everything working together nicely in your IDE.
0
 
LVL 143

Expert Comment

by:Guy Hengel [angelIII / a3]
ID: 7053222
understanding is easy: you could have some large project where you don't want to rewrite all the small nice functions...
Listening & Learning
0
Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

 
LVL 39

Accepted Solution

by:
appari earned 75 total points
ID: 7053335
0
 
LVL 44

Expert Comment

by:Arthur_Wood
ID: 7053516
the trick is to use COM Interoperability.  You can then build parts of the application in classic VB 6 and other parts in VB.NET (and/or C# for that matter).  If you want to call the VB6 components from the .NET app, COM.Interoperability will allow you to create a .NET wrapper around the VB6 DLLS (which are necessarily COM-compliant) so that they can be imported into the .NET app.  And if you want to access the .NET assemblies from your VB6 app, the COM.Interoperability will also create a COM-Wrapper around the .NET pieces, so that they appear to be COM-Compliant (as required) from the VB6 IDE.  Either way, it's your choice.
0
 

Author Comment

by:DrD
ID: 7054286
Thanks, Arthur Wood, appari,angellll, Monchanger, and ventond!

I am very grateful for your help in this. I was hoping that I could run the VB6 and VB.net code in parallel or in sequence (somehow!).

Maybe I can do this by arranging to swap data from the vb.net project to the vb6 one. This might be possible because the vb.net project will do only database operations for the time being, while I can still use the vb6 for data interpretation and graphing functions.

What do you think?

Points increased for the aggravation!

David

 
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
clicking a shape in a frame array vb6 3 55
MsgBox 4 75
What namespace do I need to import? 2 52
add criteria to query in VB, Access 2003 2 47
Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
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.
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 is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…

734 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