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
35
votes
10 answers

Is there any VB6 to C# migration tool?

Does anyone know a way to convert from VB6 code to C#? Is there a tool that can do this for me? Is there any migration process that I can follow to do this?
basl
  • 473
  • 1
  • 4
  • 3
31
votes
11 answers

Convincing legacy application VB6 developers to make the switch to C#

I know this question could be similar to others but really I'm looking for reasons why VB6 developers should switch to C#. My company recently approved project to be written in C#, so we have a lot of VB.Net programmers, however, we have some…
webdad3
  • 8,436
  • 28
  • 114
  • 206
25
votes
4 answers

How do I convert Twips to Pixels in .NET?

I'm working on a migration project in which a database actually stores display sizes in twips. Since I can't use twips to assign sizes to WPF or Winforms controls, I was wondering if .NET has a conversion method usable at runtime?
Chris Pfohl
  • 15,337
  • 8
  • 60
  • 104
23
votes
9 answers

How to migrate ugly and undocumented VB6 Code to .NET

I know that there are already Questions about VB6 migration, but the code base of my project brings some new questions here. I have to say the Code quality, structure and architecture is just a nightmare. There are 2 Big Projects: Nr.1 with 40…
marcus
  • 231
  • 2
  • 4
19
votes
2 answers

Are array indexes 0-based in VB6?

I'm reviewing an automatic translation of VB6 code to C# and the convertor translated someArray(3) to someArray[3]. But accordingly to the old code documentation it should pick the third element not the fourth as it is doing in the translated…
Jader Dias
  • 81,082
  • 147
  • 410
  • 611
16
votes
6 answers

Len() function vs String.Length property; which to choose?

I'm making the transition from VB6 to VB.Net (VS 2010) and have a basic rather than expansive understanding of the latter. I obviously have quite a bit of code to... I hesitate to use the word "upgrade" when "port" would be more apt given that the…
Alan K
  • 1,777
  • 3
  • 16
  • 29
16
votes
6 answers

VB6 migrating to .Net with Visual Studio 2010

Has anyone migrated a VB6 project to .Net with Visual Studio 2010? I have tested the migration in VS2005, but the resulting .Net code was so messed up, that we decided not to migrate to .Net. So has the VS2010 migration wizard been improved over the…
Allan Simonsen
  • 1,256
  • 4
  • 20
  • 35
15
votes
6 answers

Conversion tool comparisons for visual basic 6.0

Has anyone here used either of the following (or any other tool) to convert your vb6 code to a .net language? Artinsoft's upgrade companion (converts to c# and vb.net) vbmigration partner (converts to vb.net) How effective were they and what size…
kjack
  • 1,954
  • 1
  • 24
  • 39
15
votes
13 answers

How to prevent your code from becoming obsolete?

Some programmers here have been developing a project in VB6, and they say they now need to upgrade to vb.net if they want their apps to run on newer/future systems as vb6 is going to be history soon. So there is this huge application they have been…
JD Isaacks
  • 51,154
  • 89
  • 267
  • 413
15
votes
12 answers

.NET 2.0 or 3.5?

Our clients use a vb6 version of our software. We are upgrading them to a .NET application written in C#... Is there less bulk using .net 2.0 than .net 3.5? My definition of less bulk would be: Smaller size, smaller installation time, etc. Most of…
Shawn
  • 337
  • 1
  • 7
15
votes
5 answers

How to open visual basic 6 program with visual studio.net

I want to open a program (written in Visual basic 6) to be open in Visual Studio.net. Please guide, how could I do that? While trying to open VB6 (.vbp file) program directly from the OPEN project option in visual studion.net, I was getting this…
Asad Waheed
  • 319
  • 2
  • 3
  • 10
14
votes
4 answers

Using a VB6 Class in C#

Is it possible to use a VB6 class in C#?
James Jeffery
  • 10,301
  • 16
  • 70
  • 98
13
votes
10 answers

How to declare a fixed-length string in VB.NET?

How do i Declare a string like this: Dim strBuff As String * 256 in VB.NET?
Rachel
  • 131
  • 1
  • 1
  • 3
12
votes
3 answers

C# equivalent of VB6's GetObject

The following VB6 code connects to some third party software and forces a login with the admin username and password: Set obj = GetObject(, "workspace.application") obj.System.FixLogin strAdminUsername, strAdminPassword I am wanting to do the same…
user455176
  • 121
  • 1
  • 1
  • 3
12
votes
9 answers

How to find in my program a "const char* + int" expression

I'm in a source code migration and the converter program did not convert concatenation of embedded strings with integers. Now I have lots of code with this kind of expressions: f("some text" + i); Since C/C++ will interpret this as an array…
vz0
  • 30,291
  • 7
  • 37
  • 74
1
2 3
41 42