Questions tagged [vb6-migration]

This tag is for questions about migrating existing applications, or legacy code, from Visual Basic 6 to a more modern platform. Unfortunately migration is usually a tricky task. The most common target platforms are VB.NET and C#.

Here are some typical motives for migration

  • To use a more modern programming language for enhancements.
    • This will give some increase in productivity.
    • This also keeps the developers happy, which is a valid business benefit in itself. There are bigger gains in productivity from attracting and retaining good developers than anything else.
  • To use a fully supported programming stack.
    • Although the VB6 runtime is still fully supported by Microsoft as part of Windows, many people worry that support will be dropped one day. The VB6 IDE is no longer supported.

Frequently asked questions

669 questions
7
votes
5 answers

Strategy for converting a VB6 app to .NET

Would it be a good idea to start converting forms into .NET one at a time which you would then invoke from the VB6 app via COM-interop. This way, by the end of the process you would just convert the 'shell' of the VB6 application into a new .NET…
Craig Johnston
  • 5,303
  • 8
  • 27
  • 30
7
votes
5 answers

Can/how do you host a full VB6 Form in a C# WPF app?

I am currently exploring the option of porting some older VB6 application to WPF with C#. The plan, in phase one, is to port several key forms and not all the application. The theoretical goal is to open the VB6 form in a container of some sort…
jasonk
  • 1,580
  • 4
  • 25
  • 33
7
votes
4 answers

PV Function and Porting VB6 to C#

I'm working on porting some classic VB6 code to C# and just stumbled across a usage of the PV function. I feels wrong including a reference to the Microsoft.VisualBasic Assembly. Is this something that is commonly done, or should I explore further…
David
  • 19,389
  • 12
  • 63
  • 87
7
votes
2 answers

visual basic and vb.net

I was a moderately successful VB6 programmer (by that I mean nothing really complicated, just fairly simple apps for my own use). I am trying to "migrate" myself to Visual Studio 2010 (specifically VB). Oh my gosh, it's changed! Having had no…
Bill Norman
  • 883
  • 11
  • 29
7
votes
3 answers

Converting DateAdd and Format code from VB6 to C#

I have the following code in vb - tAvailableDate = DateAdd("d", 21, Format(Now, gDATEFORMAT)) I am attempting to convert this into C#. I have converted this so far - tAvailableDate = DateAdd("d", 21, Format (DateTime.Now,…
eric_13
  • 383
  • 1
  • 8
  • 22
6
votes
3 answers

convert vb6 project to .net using VS2010 Express?

I can't seem to convert my vb6 ActiveX dll project (.vbp) to .net using VS2010 Express. Is there another way? UPDATE So now that Microsoft has stopped offering a VB6 migration tool (VS2010). Should I migrate to .NET 3.5 instead and use VS2008? Get…
webdad3
  • 8,893
  • 30
  • 121
  • 223
6
votes
1 answer

Is it possible to call a vb cls file in java

Is it possible to call a vb6 class file like (example.cls) in java by any means? if its possible can you suggest how it can be implemented like where should i start looking.
Arun Michael
  • 190
  • 2
  • 12
6
votes
2 answers

Multiple constructors in VB6?

Is it possible to have multiple constructors in vb6? The reason I'm asking is because I see the class initialize, but i don't know if I can stick in 0 or more parameters into a constructor or if class_initialize is the constructor and it can accept…
RetroCoder
  • 2,597
  • 10
  • 52
  • 81
6
votes
3 answers

Err.Number (VB6 versus C#)

I've used Artinsoft's VB6 to .NET wizard to convert a VB6 application to C# and I'm getting an upgrade warning in any place where Err.Number was previously used; //UPGRADE_WARNING: (2081) Err.Number has a new behavior. The converted code is…
Chris McAtackney
  • 5,192
  • 8
  • 45
  • 69
6
votes
6 answers

What's the fastest way to convert an existing Vb6.0 win-based application into a c# win-based?

What's the fastest way to convert an existing Vb6.0 win-based application into a c# win-based?
odiseh
  • 25,407
  • 33
  • 108
  • 151
6
votes
7 answers

Will "Working Effectively with Legacy Code" help someone working with an application ported from VB6 to VB.NET?

I would like to refactor a large legacy application originally written in Visual Basic 6.0 and subsequently ported to .NET. In order to do this with confidence, I want to have unit tests around the existing code so I can compare before and after.…
user16324
5
votes
3 answers

Converting a VB6 module to VB.NET

I'm almost done converting a module from VB6 to VB.NET, but I'm having trouble with the following 2 quotes and am wondering if there's any way to go about this: Structure AUDINPUTARRAY bytes(5000) As Byte End Structure I'm trying to change that…
user1060582
  • 185
  • 1
  • 1
  • 6
5
votes
1 answer

What does "UPGRADE_WARNING: Mod has a new behavior" refer to?

I had to convert some VB6 code to VB.net using the old VS2008 conversion tool. That tool helpfully inserts warning comments when it was not sure that the original & converted code was equivalent. One such example is: UPGRADE_WARNING: Mod has a new…
StayOnTarget
  • 11,743
  • 10
  • 52
  • 81
5
votes
1 answer

Can I make a function COM Only? (Opposite of )

I have some functions in my VB.NET DLL which I can 'hide' from my VB6 app by using the following: _ But is there a way to make a function ONLY visible to COM clients and not to .NET assemblies? This way I…
Matt Wilko
  • 26,994
  • 10
  • 93
  • 143
5
votes
8 answers

Best Development tools for Upgrading from VB6.0

Im planning to upgrade a large vb6 application to .net. The project uses many third party components eg VSFlexGrid as well as crystal reports. It also uses old VB6 dlls whose source code is unavailable. My questions are Should I convert the source…
Jack Njiri
  • 346
  • 1
  • 5
  • 12
1 2
3
44 45