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

629 questions
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…
Dave
  • 18,595
  • 12
  • 59
  • 84
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
  • 7
  • 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,436
  • 28
  • 114
  • 206
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
  • 220
  • 1
  • 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,344
  • 10
  • 49
  • 79
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
  • 22,127
  • 30
  • 101
  • 150
6
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
  • 853
  • 11
  • 28
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
  • 175
  • 1
  • 1
  • 6
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
  • 25,893
  • 10
  • 85
  • 132
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
  • 326
  • 1
  • 5
  • 12
5
votes
2 answers

Migrating from VB6 to .NET, is there an equivalent function for TreeNode.FirstSibling?

The desktop application I'm migrating makes heavy use of a TreeView control, and many calls to TreeNode.FirstSibling, e.g. 'UPGRADE_ISSUE: MSComctlLib.Node property tvTreeView.SelectedItem.FirstSibling was not upgraded. If…
brasskazoo
  • 68,343
  • 22
  • 59
  • 74
5
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…
Christopher McAtackney
  • 4,926
  • 7
  • 41
  • 68
5
votes
1 answer

Excel VBA ADODB Late Binding error

Actually every time I am using the Early binding code to use the ADODB Connection , However now I want to use the Late Binding Code. According to me, it seems the code is perfect but I don't the how I am getting an error Like "Argument are of the…
Sarfaraz78615
  • 61
  • 1
  • 6
5
votes
2 answers

Equivalent for getobjectcontext() in visual studio 2012 vb.net?

I have a vb6 COM object that I am converting to VB.Net 2012 My sample code looks like below : Dim ObjContext ,objx ,objy As Object Dim Rs As ADODB.Recordset Set ObjContext = GetObjectContext Set objx =ObjContext.CreateInstance("abc.class1") Set…
1 2
3
41 42