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

How to we make the PopUpMenu to stop after showing in VB.NET?

I have a problem while showing the PopMenu control in VB.NET. Where as in VB6 after showing PopUpMenu control holds on the screeen event after we have code after that also. But when we convert that to VB.NET we get ContextMenu.Show() the control is…
Hemant Kumar
  • 4,593
  • 9
  • 56
  • 95
0
votes
1 answer

zlib.net code example for C# that take byte[] as input agument

I spent 3 hours searching for how to uncompress a string using Zlib.net.dll and I did not find anything useful. Since my string is compressed by the old VB6 program that uses zlib.dll and I do not want to use file access each time I want to…
Felix Vo
  • 1
  • 2
0
votes
2 answers

How to Handle SelectedIndex and Double Click event for ListBox in VB.NET?

I have a functionality regarding the double click of ListBox which already has SelectedIndexChanged event.The same events in vb6 works fine,but when it comes to single click the SelectedIndexChanged Event is firing always when I click for Double…
Hemant Kumar
  • 4,593
  • 9
  • 56
  • 95
0
votes
0 answers

What is the reason behind this Error?

I have faced a problem when converting the access .mdb file data to CSV.I got this error "The command or action 'TransferText' isn't available now" when doing the transferText with the inbuild function. The code was written like this…
Hemant Kumar
  • 4,593
  • 9
  • 56
  • 95
0
votes
0 answers

Do we have any thing related to OLE in VB.NET?

We have a VB6 to VB.NET migrated project in which we have OLE control.Do we have any control in Vb.NET to replace the OLE?
Hemant Kumar
  • 4,593
  • 9
  • 56
  • 95
0
votes
1 answer

How to restrict to select multi Select of Files in Open FileDialog?

I have some task to select files in VB6 with the control "CommonDialog1".When the project is migrated this control is converted to openfile dialog.When some of the properties are not converted it is showing as commented. This line was commented…
Hemant Kumar
  • 4,593
  • 9
  • 56
  • 95
0
votes
2 answers

Parse command line from a third party program scheduler in VB.NET

I have problem creating a console vb.net program that executes a stored procedure in Oracle database. I can do this if the stored procedure will be hard coded in the code. The problem is, the stored procedure will need to be place in a parameter…
0
votes
1 answer

Unable to cast object of type 'ADODB.Recordset' to type 'MSDATASRC.DataSource'

I have a one migrated Vb6 to c#.net project. When I run this c# solution I got an InvalidCastException like Unable to cast object of type 'ADODB.Recordset' to type 'MSDATASRC.DataSource' at the statement DataGrid1.DataSource =…
skumar
  • 437
  • 2
  • 4
  • 12
0
votes
1 answer

Converting a file read VB code to c#

I need to convert a piece of code from VB to C#. what should I use in place of FileSystemObject and TextStream? what the below code does is that it reads a file already present in a directory and adds the content of the file to the fields. Private…
0
votes
1 answer

What is winsock.index?

I've been given a VB6 program to convert to .NET, and while most of the VB6 specifics I've been able to figure out through googling, there's one that I just have no idea about. Winsock is used, but the conversion utility replaced it with…
cost
  • 4,420
  • 8
  • 48
  • 80
0
votes
1 answer

# symbol before number

I have received the misfortune task of upgrading an old and cranky (as much as it's code) VB6 app to c#. in many places along the code I'm seeing this # symbol before a number and it seems like some sort of viable. For example: Dim line As String…
Slime recipe
  • 2,223
  • 3
  • 32
  • 49
0
votes
0 answers

How to handle the date format in Excel?

We have VBA for exporting data from FlexGrid to Excel. This is done with assigning cell formats to the columns. We are migrating the project to VB.NET where we are following the same process by assigning the date format to the cells as below: …
Hemant Kumar
  • 4,593
  • 9
  • 56
  • 95
0
votes
3 answers

What is VB6's native UI design pattern?

We're rewriting an old VB6 app in .Net and WPF. I'm going to be helping some co-workers who support the old app get up to speed in WPF and MVVM. My background is in .Net and C# so I don't know VB6, but I'd like to understand where they're coming…
user316117
  • 7,971
  • 20
  • 83
  • 158
0
votes
1 answer

How to DrawString Just after the Text in a Picture Box with out knowing the X and Y postions?

I am working in a VB6 to VB.NET migrated project.In VB6 I have a picture box in runtime design a form using the Graphics.Suppose I have a two labels lbl1 and lbl2 just to the right when we mousedown on the picture box showing a textbox to enter…
Hemant Kumar
  • 4,593
  • 9
  • 56
  • 95
0
votes
1 answer

Upgrading VB6 to VB.NET - Usercontrol not available because I could not compile the project

I have upgrade a VB6 project with the upgrade wizard to VB.NET. I think I am in a vicious circle now: There is one user control in my main form that is accessed from many other forms. The IDE tells me that it shows the maximum amount of errors…
tmighty
  • 10,734
  • 21
  • 104
  • 218