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

What's the simplest .NET equivalent of a VB6 control array?

Maybe I just don't know .NET well enough yet, but I have yet to see a satisfactory way to implement this simple VB6 code easily in .NET (assume this code is on a form with N CommandButtons in array Command1() and N TextBoxes in array…
raven
  • 17,276
  • 15
  • 76
  • 110
10
votes
7 answers

Porting VB6 app to VB.Net: Can anyone ballpark how much effort this is?

In 2002 I did a pretty large VB6 app for a client. It used a lot of UserControls and a 3rd party menu control (for putting icons next to menu names). It had dynamically "splittable" panels, TreeViews with multi-state checkboxes, etc. A very rich UI.…
Robusto
  • 29,248
  • 8
  • 52
  • 76
9
votes
3 answers

What did VB replace the function "Set" with?

I've found several aspx codes for forms which include the use of a "Set" function. When I try them out on the hosting server, I get an error message that "Set is no longer supported". Anyone know what replaced the "Set" command? More specifically,…
Deena
9
votes
2 answers

Convert Visual Basic 6.0 type to VB.NET 'Structure'

EDIT: Having gotten this to work under 32-bit, I'm now trying to get it to work for 64-bit. I've gotten source code for the DLL and both DLL and application are being compiled for 64-bit. I get an access violation every time. Here is the DLL code…
Dan Barron
  • 1,064
  • 2
  • 12
  • 29
9
votes
2 answers

Implications of "Public Shared" Sub / Function in VB

Can anyone explain me in VB i need to use Public Shared Sub so it can be accessed from another form. But what this "Public" and "Shared" means? Who is public? With who is shared? If it is public shared does this means some other software or…
osdTech
  • 137
  • 1
  • 2
  • 10
9
votes
4 answers

What is the VB statement phrase "Chr(0)" equivalent in C#?

What is the VB statement expression Chr(0) equivalent in C#? Thanks for any help.
user225626
  • 1,113
  • 5
  • 14
  • 30
8
votes
5 answers

Best Strategy or tools for migrating from VB6 to .NET/.NET Core

My company has tons of legacy applications that are written in VB6. We are in transitions from moving VB6 applications to .NET (3.5 specifically). What would be the best strategy for moving form VB6 to .NET? NOTE: Below update should go to…
dance2die
  • 31,758
  • 34
  • 122
  • 177
7
votes
1 answer

VB6/VBA MSFlexGrid to VB.NET DataGridView

Yet again, more fantastic VB6 to VB.NET migration. Okay sure, this isn't necessarily a "Question" in definition, but it will answer many questions that users will have in the future, and will hopefully answer my questions as well. I am trying to…
Logan B. Lehman
  • 4,337
  • 6
  • 30
  • 43
7
votes
4 answers

Equivalent of "Dim As String * 1" VB6 to VB.NET

I have some VB6 code that needs to be migrated to VB.NET, and I wanted to inquire about this line of code, and see if there is a way to implement it in .NET Dim strChar1 As String * 1 Intellisense keeps telling me that an end of statement is…
Logan B. Lehman
  • 4,337
  • 6
  • 30
  • 43
7
votes
3 answers

Force Modal Form to be Shown in Taskbar

According to MS when you show a modal form in VB6 it does not show in the taskbar 'by design' But is there any way to make a VB6 Modal form to be shown in the taskbar (the ShowInTaskbar property has no effect when it is modal) In one of our apps we…
Matt Wilko
  • 25,893
  • 10
  • 85
  • 132
7
votes
3 answers

Is there a way to programmatically convert VB6 Formatting strings to .NET Formatting strings?

Does anyone know of a good reference for VB6 format-strings? Does anyone know of a converter from VB6 formatting strings to .NET strings? I'm working on porting a large VB6 code base to .NET. It is a database centric piece of software, and the…
Chris Pfohl
  • 15,337
  • 8
  • 60
  • 104
7
votes
1 answer

What does the Attribute keyword do in VB6?

I am converting some VB6 code to VB.Net. Since my VB6 installation appears to be damaged beyond repair I am using Notepad to read the original source code and can see at near the top of the file:- Attribute VB_Name = "clsBulge" Attribute…
Brian Hooper
  • 20,414
  • 23
  • 82
  • 132
7
votes
4 answers

Making a DLL COM accessible

I have a class library written in .Net that I would like to make available to VB6/VBA. What I tried did not work (obviously as I am asking this question). Here is what I did: I Created a Class Library Project in Visual Studio 2010 Express and put…
Oorang
  • 6,330
  • 33
  • 50
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
  • 4,773
  • 8
  • 25
  • 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,550
  • 4
  • 24
  • 33
1
2
3
41 42