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
1 answer

ComboBox hidden behind Button not triggering on Click event

I'm converting an old VB form to .NET, and there a few Buttons which each have a corresponding ComboBox hiding behind them. The previous behavior was that you'd click the Button, and that would trigger the ComboBox behind it, which would then drop…
Wingman4l7
  • 649
  • 1
  • 8
  • 23
0
votes
1 answer

Using VB6 event in VB.net e.g AfterColUpdate (DataGridView event)

I am doing VB6 to VB.NET conversion. I am facing problem in using below DataGridView events in VB.NET : AfterColUpdate AfterDelete BeforeDelete Please help.
Preeti
  • 1,386
  • 8
  • 57
  • 112
0
votes
1 answer

SetValue/GetValue vs. directly accessing array via arguments

I have an array which originally was a Variant array in VB6. Example code in VB6: ListBoxDrawings.List(X1, Y1) = myArray(X2, Y2) myArray(A, B) = ListBoxDrawings.List(I, C) After running it through ArtinSoft's VBUC, its values are handled using…
Wingman4l7
  • 649
  • 1
  • 8
  • 23
0
votes
3 answers

.Net unicode problem, vb6 legacy

I have a decryption routine in VB6. I now want the same decryption in C#. The strings that need decryption are in unicode, so I use Encoding.Unicode.GetString to read the input in C#. The input now looks exactly the same as in VB6. The first few…
Michel van Engelen
  • 2,791
  • 2
  • 29
  • 45
0
votes
1 answer

Tabpro third party control not converting completely while converted from vb6 to vb.net

I migrated an application form vb6 to vb.net. Tabpro third party controls are used in vb6. The Tabpro control has multiple tabs, when I convert only the first tab of the control was converted. All other tabs are blanked. Please suggest what the…
Areeb
  • 219
  • 1
  • 4
  • 14
0
votes
5 answers

What is the C# equivalent of this VB6 Rnd() call?

I am having a problem with the VB code Int(Rnd() * 75) + 75) conveting it to C#. I have tried Random random = new Random random.Next( 75 ) + 75 But its isnt right. Please Help me. Thanks
Sigh-AniDe
  • 237
  • 1
  • 5
  • 16
0
votes
1 answer

How to Convert the Code in VB 6 to VB.NET?

I got a chance to work in the migration project(VB to VB.NET).I was confusing in the RecordSet functionality.In our project we are taking the DataReader according to the scenario.But in the Looping cases like dsr.EOF. Dim recordset As…
Hemant Kumar
  • 4,593
  • 9
  • 56
  • 95
0
votes
1 answer

can't able to convert axmschart as bitmap.(vb.net)

i am working on a project which is migrated from vb6 to vb.net.And during working with the crystal reports i got this problem.Actually i have to print the axmschart of my application in reports.So i am using the following code : gtmpString =…
-1
votes
1 answer

vb.net LED BOARD DISPLAY user control

I am developing LEDBOARD user control in vb.net.I have done it also .Actually its taking too much time to load .In the vb6 same application I am loading 3000 labels using a label control array but not time consuming .In vb.net I am doing same but…
Coder Guru
  • 513
  • 3
  • 18
  • 37
-1
votes
1 answer

LockWindowUpdate in vb.net without using dll?

I'm beginner for API Conversion from vb to vb.net.In vb6 they using user32 DLL.In Vb.Net i need to call LockWindowUpdate Function() without that "User32.dll" function. Is there any way to Lock window state without using any API Calls in vb.net..?…
Rajesh_Bangalore
  • 613
  • 5
  • 21
-1
votes
1 answer

how to fix Option Strict On disallows narrowing from type 'Object' to type 'String' in copying the value of 'ByRef' parameter

I Have below code which gives me error "Option Strict On disallows narrowing from type "Option Strict On disallows narrowing from type 'Object' to type 'String' in copying the value of 'ByRef' parameter 'varExpression' back to the matching…
vandy
  • 63
  • 8
-1
votes
1 answer

Hide printing page x of y dialog box in VB6 using Printer Object. NOT PrintDocument one

My code is Dim p As New Printer p.Print("Hello") p.EndDoc() I have used Dim k As New System.Drawing.Printing.PreviewPrintController But its giving me compile time error in VB.Net / VB6. I cannot use PrintDocument and I want to…
Jack
  • 1
  • 1
-1
votes
1 answer

VB.Net has AxVSFlex7 when add referent to VSFlex7.ocx

I use VS 2015 and I create a VB.net project. Then I add VSFlex7.ocx component, it automatic generate AxFSFlex7 in the references, see more at attachment image plese I do not know why. What is "Ax" enter image description here Thank you!
-1
votes
2 answers

I have a project Converted from VB6 to VB.Net that uses .NET 4.5.2 with a BaseControlArray Issue

Ok so, I had a Line Control on a form on the VB6 Version however the conversion made a file on it separately. The Compiled Output works but it comes with a Warning that I want to remove for 4.6+ support for if Miscorsoft.VisualBasic.Compatibility…
PSXGamerPro1
  • 152
  • 10
-1
votes
1 answer

how do you pass a C# COM interropt DLL as param in vb6

I have a C# DLL that is being used as a class to contain a list of properties about a file. The C# DLL is COM visible, and is able to be declared and instantiated in VB6. Inside my vb6 function where I create the object.. Dim fileObj As New…
Robert G
  • 17
  • 4