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
4
votes
2 answers

Can an Outlook 2003 COM add-in written in VB6 be made to work with Outlook 2010?

I have inherited an Outlook 2003 COM add-in written using VB6 (note: NOT VB.NET). I need to upgrade this to work with Outlook 2010. Is it possible to create an add-in for Outlook 2010 using VB6, or do I need to re-implement everything?
Gary McGill
  • 26,400
  • 25
  • 118
  • 202
4
votes
1 answer

How to read a vb6 fixed-length string from a binary file in vb.net

CONTEXT I have a vb6 software that use this particular Type: Type Example A As Integer B As Single C As String * 10 D As Byte E As String End Type This structure is entirely saved in a binary file with a simple "put": Dim…
Calaf
  • 1,133
  • 2
  • 9
  • 22
4
votes
4 answers

vb6 control arrays in .net?

Are control arrays supported in .Net? We are talking about converting a legacy app from VB6 to .NET. The app has a lot of control arrays. I've read different articles that differ if .NET support control arrays. Can anyone give me a definitive…
webdad3
  • 8,893
  • 30
  • 121
  • 223
4
votes
2 answers

What is C# equivalent of VB6's Label.FontName?

VB6's Label controls have a Property FontName, which allows you to set the font like this: lblTitle.FontName = "Arial Bold". Does C# have something similar? I'm porting a database heavy program from VB6 to C#, and I get names of fonts like "Arial…
Chris Pfohl
  • 18,220
  • 9
  • 68
  • 111
4
votes
4 answers

VB6 Manifest not working on Windows 7

I have created a manifest file for a VB6 application that is running on Windows 7 (not for any visual style changes, just to make sure it accesses the common registry and not a virtualised one) The exe name is Capadm40.exe, the manifest is named…
Matt Wilko
  • 26,994
  • 10
  • 93
  • 143
4
votes
1 answer

Marshaling a ComVisible component vararg array parameter

I'm looking at migrating some legacy COM code written in VB6 to .NET, however this needs to generate a typelib that's fairly close to the original. I've bumped into a problem passing in an array of parameters when early bound to other VB6…
Chris J
  • 30,688
  • 6
  • 69
  • 111
4
votes
1 answer

Equivalent of (VB6) IsMissing in C#?

Here's what I get in VB6 Description: How to do this in c#? P.S. I also don't know how to use optional parameter in c#.
jclima05
  • 162
  • 2
  • 10
4
votes
2 answers

Gradually refactoring pieces of a giant, monolithic VB6 winforms app to .Net

In a nutshell, the app looks up an instruction for something to do from a database, performs the action, and saves information about the success or failure of that action back to the database. It performs about 40 different actions, things like…
Roger Harvest
  • 460
  • 5
  • 16
4
votes
2 answers

Replacements for DirListBox and/or FileListBox from Microsoft.VisualBasic.Compatibility

I have a VB6 application that has been migrated to VB.net, and am trying to upgrade the framework version to 4.5 -- which complained that everything in Microsoft.VisualBasic.Compatibility dll was obsolete. I was able to replace everything except…
jmoreno
  • 12,752
  • 4
  • 60
  • 91
4
votes
8 answers

Migration of a VB6 application

Migation of a VB6 application to .NET platform is almost like a rewrite, no matter it is VB.NET or C#. Do you think it will require more effort to do it in Java platform, when compared to .NET platform, since it is a rewrite anyway? Please share…
WinFXGuy
  • 1,527
  • 7
  • 26
  • 47
4
votes
3 answers

We have migrated VB6 code to C# in .net

The code was migrated using a third party tool. what ever the tool couldnt do, was done by the .net developers, so that all compile issues were fixed. My question is, for such migration activities, do we not bother running unit tests for the…
VB.
  • 41
  • 1
4
votes
3 answers

Upgrading a large VB6 app to .NET. Opinions on VB Migration Partner

I have a really large VB6 code base with a ton of 3rd party controls. Want to move it to .NET. Rewriting it is out of question - the client sees no value in spending money to get the same thing. Moving to .NET with the built-in upgrade wizard is…
AngryHacker
  • 59,598
  • 102
  • 325
  • 594
4
votes
2 answers

How to avoid rewriting a VB6 from scratch when migrating to .Net

In our company we develop and sell a VB6 application and we think it's about time to migrate it to .NET. The main reasons are: We expect VB6 runtime support to end at some point in time, and we do not want to start the migration just then since…
Gooo
  • 239
  • 1
  • 8
4
votes
1 answer

VB6 COM Class Replacement With C# Rebuilt Update

I've got a particularly tricky situation here that I would like to throw out there for a bit more feedback on (I'm the only .NET dev in the company I work for so no-one to bounce off). I've been tasked with replacing an aging VB6 authored ActiveX…
Jammer
  • 9,969
  • 11
  • 68
  • 115
4
votes
5 answers

VB6 Format function: analog in .NET

There is String.Format function that is referred to in the documentation as the analog for Format function from VB6. There's also Format function from VisualBasic namespace that is provided for compatibility and basically has same powers as…
GSerg
  • 76,472
  • 17
  • 159
  • 346