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
0
votes
3 answers

Can We use the VB6 PictureBox in VB.NET?

I have a Migrated Project which contains PictureBox Events.When it is migrated to VB.NET 2008 some events are converted which are not correct.Because the PictureBox in VB.NET is different to VB6 PictureBox.I want to know one thing that can we use…
Hemant Kumar
  • 4,593
  • 9
  • 56
  • 95
0
votes
3 answers

Is it fine to Add a reference of Microsoft.Visual Basic and use the functions in C#

A general question. Is it considered ok to add a reference of Microsoft.Visualbasic and use in C# or will it slow down our website? VB has functions like Strings.Format etc. I am right now converting a hell lot of code from VBA to C# and am short on…
vini
  • 4,657
  • 24
  • 82
  • 170
0
votes
1 answer

convert vb6 StrConv(string, vbunicode) to c#

I'm having trouble converting the following VB6 code into c#4.0? This function takes a BLOb from an oracle database and converts it to bytes. After removing the code un-needed by this example, it looked something like this... Function tempFunc(Data…
Thundter
  • 582
  • 9
  • 22
0
votes
1 answer

Is Twips is Supported in .NET?

I am working in a VB6 to DotNet Migration project.Here in our VB 6 project they are calculating the some mouse move events in Twips, but when it is converted in VB.NET is giving the mouse move values as pixels.Does the twips is Supported in…
Hemant Kumar
  • 4,593
  • 9
  • 56
  • 95
0
votes
1 answer

What is an Ado.net equivalent of this Ado sample?

AFAIK ado.net datareaders and datasets don't seem to support joins in sql statements. Is it possible to retrieve the ado.net equivalent of this ado recordset using just the information presented in this ado/vb code : I am asking the question this…
kjack
  • 2,004
  • 3
  • 26
  • 41
0
votes
1 answer

Difference between AxMSHFlexGrid and MSHFlexGrid

I am performing a bit of maintenance on an ancient application written years and years ago in VB6. At some point it was migrated to VB.NET with virtually no changes. I don't know how or why they managed that. The project in source control contains…
JDB
  • 25,172
  • 5
  • 72
  • 123
0
votes
2 answers

vb6 to C# conversion. Crystal Reports - ParameterFields

I have the following code in vb6 and I cannot figure out how to convert it to C# (visual studio 2010) for the life of me. vb6 - crtPanelStudyAuditTrail.ParameterFields(0) = "GA_PANEL;" & Trim(txtPanelStudy) & ";True" …
0
votes
3 answers

How to open a WPF exe from within a VB6 dll?

This is a question about design approach. I have limited COM experience and a little WCF experience. My constraints are given by the application environment, but I have some design flexibility. From within a VB6 dll, I need to start, and communicate…
JimBoone
  • 554
  • 1
  • 7
  • 27
0
votes
2 answers

Converting Fixed length statement from VB6 to VB.Net

We perform a protocol based data sending to device where the device requires a formatted data packets. the sample packet data is XXFSXXXFSXXXXXXXFSXXXXXX. The X mentioned is the max length size of each string. if data is less than string max length…
Ragav
  • 942
  • 4
  • 19
  • 37
0
votes
2 answers

vb6 function to vb.net

i got this code in vb6 Private Sub pause(ByVal interval As Variant) Dim Current As Variant Current = Timer Do While Timer - Current < Val(interval) DoEvents Loop End Sub How do I convert in vb.net? I have tried this way but…
yonghan79
  • 15
  • 6
0
votes
1 answer

VB6.SetItemData(combobox, i, rd.Fields("XXX").Value)

I am converting VB6 to VB.NET using VS2010 When I was converting the code, I found something that I don't understand the meaning of what the code is doing and getting and how to convert it well. i = 0 While Not rd.EOF …
user1506228
  • 45
  • 4
  • 10
0
votes
2 answers

xxx.exe has encountered a p‌r‌o‌b‌l‌e‌m and needs to close

I am converting programs from VB6 to VB.NET with VS2005 then to VS2010 . This error had occured: 'xxx.exe' has encountered a problem and needs to close. while I was running a report function in an application and caused it to terminate. I read…
user1506228
  • 45
  • 4
  • 10
0
votes
1 answer

Microsoft.VisualBasic.Compatibility.VB6.RadioButtonArray

My boss given me different conversion from VB6 to VB2005(2.0 .Net framework) then to VB2010(4.0 .Net framework). when i being converting, i found this warning from VB2005 to VB2010, Warning 'Microsoft.VisualBasic.Compatibility.VB6.RadioButtonArray'…
user1506228
  • 45
  • 4
  • 10
0
votes
2 answers

Display a DAO table in a form

I'm upgrading an old VB6 application to VB.NET that uses DAO to connect to an Access database. I know that this is a hopelessly outdated technology, but considering the amount of work changing to ADO, I've decided to stay with DAO, despite the…
joharei
  • 578
  • 1
  • 5
  • 22
0
votes
2 answers

vb6 to C#. Open for file as output, freefile

I have the following code in vb6 - dim iFreeFile as integer iFreeFile = FreeFile Open tSendFileName For Output As #iFreeFile I need to convert this to C# but I am having difficulty. I was trying to use StreamWriter but came across the issue of…
eric_13
  • 383
  • 1
  • 8
  • 22