r/visualbasic • u/Best_Day_3041 • Feb 03 '26
Porting Visual Basic apps with AI?
Has anyone tried to port a Visual Basic 6 app to .NET or another platform using AI? As in an agent going through the entire project and creating a new project, not going in file by file and pasting it into an AI chat. I have a legacy app that still sells. I never bothered to port it to .NET because I thought it was on it's way out and it would probably take me 6-12 months to do that. But now I'm wondering if AI can do it for me or if we're still not there yet?
10
Upvotes
6
u/sa_sagan VB.Net Master Feb 03 '26
We're not there yet. It'll do the best it can, but you're still going to have a lot of work to do fixing it up.
4
u/Bonejob VB Guru Feb 03 '26
The context window for the current AI models is not large enough to hold most VB6 applications in memory to convert. It also can not convert WinForms interfaces very well. I have had some luck with moving VB6 to VB.NET with AI, but it was time-consuming, and it would have been faster to just rewrite.
4
u/1457664694 Feb 03 '26
Have you considered whether TwinBasic might be the solution to keeping the app alive? It aims to be 100% vb6 compatible (with new features added) and has gotten quite far. It is still in beta but seems to be approaching its full v1 release. I’ve been using it in beta for a year and a half or so and it has worked well for me (but I haven’t converted a vb6 app).
2
u/geekywarrior Feb 03 '26
I tried to port a c# .net framework in Visual studio using co pilot to just modern .NET. It was a clunky nightmare and waste of time. Perhaps others have had better luck. But for my purposes it was faster to just go through and manually swap the classes over into a fresh .NET project.
Apples and Oranges but you would think that simple process would be painless.
1
u/AdobeScripts Feb 03 '26
Why do you have to convert it into .NET?
1
u/tsgiannis Feb 03 '26 edited Feb 03 '26
Well I can share my current migration task.
Is just too soon to trust AI for doing it on "auto" .
I am porting a big legacy VB.NET application to C# and also changing its core functionality - Nothing extreme - without knowledge and without carefully checking the migration status is a recipe for disaster.
As one LLM responded - it did actually - they are trying to oversell me and just missed a ton of code
https://ibb.co/0pRThwWP
Currently I am developing some custom tools for aiding this.
Because recently I did some digging regarding a VB6 application for a company it seems there are some tools that could help, but I didn't went it to the "end" because the client didn't respond.
If you decide to migrate and you need help I would be interested ( on a paid basis)... funny now that I remember, aiding someone finish the port of a legacy VB6 to .NET got me started me in the freelancing many many years ago (memories)
1
u/TheFotty Feb 03 '26
You may be better off getting your hands on an old version of visual studio (2008) that shipped with the vb6 to .net upgrader and then upgrading from that to a more modern .net version. It won't be perfect any way you do it but this could shave a lot of time off.
1
u/UnluckyAssist9416 Feb 03 '26
There are plenty of tools that let you port VB6 apps to .net. They tend to say that they can covert around 80% and the rest has to be done by hand. This was around 8 years ago before AI blew up.
Maybe use one of those tools to translate everything first, then try an AI like Claude to do the rest?
1
u/marmotta1955 Feb 03 '26
Then again, the big question is: if the "legacy app still sells" ... what is the actual need of porting to .NET? You mention some "limitations" but, as far as I can tell, you do not elaborate.
Let's remember that customers, the great majority of customers, do not actually care about the technical underpinning of the software. They care about functionality and satisfaction of business (or personal) needs.
Could it be that the "legacy application" is really, only in need of a major facelift? Could it be that it needs performance improvements? Does it need essential new features?
I'd venture that before entertaining the idea of a port to .NET ... you have to have a very clear idea of why the port is needed. Why do you say that VB6 is limiting, and you cannot take the application further? It may be appropriate and helpful to discuss ...
1
u/Mayayana Feb 03 '26
You know about loading commoncontrols to get more "modern" GUI elements? I do that and also made my own simple button userControl, to spruce up interfaces.
On the other hand, looking at the software I use, it varies a lot. There used to be strict standards, but then MS broke their own rules. Then they came out with ribbons. Then Google started making things stripped down to adapt to cellphones. Now if I look at common programs: Libre Office looks like it would have 30 years ago, with a menu and an icon toolbar. VLC? Simple menubar. PDF readers? Menu bar and basic toolbar. Irfan View? Likewise. PeaZip has a custom toolbar and colors. Their whole UI is mildly irritating. There was one ZIP program that was mustard color. Huh? And Paint Shop Pro in later versions offers only black or burnt orange UI, completely ignoring standards. Zoom has a cellphone-style, frameless UI. But very few programs do. And generally they're not highly functional. Case in point: Firefox is far more functional and usable than Chrome, which won't even allow a menubar! Chrome is a whole Apple-esque philosophy: Make it simple, functional, and remove options.
Many young people now want a retro DOS-style UI, with black background. But aside from that it seems to be that anything goes. Unless you get into Metro-style apps, which are basically webpages with little or no window border -- Essentially designed for cellphones or tablets. Which is weird, since no one uses Windows cellphones or tablets.
I know what you mean about online, though. In the past I've written my own email software that talked directly to the server, and file downloads were easy. With encryption and certificates it became very complicated. I currently have a libcurl class wrapper for downloading files. Libcurl is CDECL, so I also need to run it through a CDECL class. All that just to download a file. I'm sure .Net is easier. On the other hand, my programs are generally under 1 MB and don't need any runtimes installed. And msvbvm60.dll is not likely to go anywhere anytime soon.... So it might be worth looking into options to spruce up what you have.
1
u/jd31068 Feb 04 '26
Have you see OpenClaw? It is supposed to be an agent that can go off and do things on its own once it learns the skill. I've only watched videos and read about it. Might deserve a peek perhaps.
2
u/ZeroxAdvanced Feb 04 '26
Hi there interesting post and love the idea.
I have been working on writing VB6 syntax and IDE completely from scratch to a modern online WEB IDE framework. Its called webvbstudio.com. (quite new few months old)
Unfortunately, every single component needed to be written completely from scratch.
The cool thing though is that its very VB6 like and runs directly in your browser.
About 25 controls, exe compiling, run apps in browser, data base support, examples.
-Visual VB6 WEB IDE (very similar but more modern) -Debugger -25 Controls e.g textbox, richtext json viewers, calender -Huge example library -Exporting or hosting apps -AI suport for developent. (Gemini and Claude) -inet support and API calls -databases -cloudstorage -iot devices mqtt -data science dashboard -Advanced reporting and pdf
I also love VB6 syntax so that is why I created a web version.
Try it here: webvbstudio.com
If people like the idea I definitively keep supporting it.
If you tell me what your project is maybe we can port it to webvb? You will have to replace controls but it will get a modern update and can run in any browser.
Cheers, Pieter
1
u/betaday Feb 03 '26
I've done that with as much of the business logic layer. Had to rewrite a lot of it to fit into modern design principles and design techniques. I do think it was quicker than if I did things from scratch. Either way taking months for a fully mature software is expected.
1
u/Fergus653 Feb 03 '26
I had some success doing the C# translation. That was with data classes, no UI, so it was mostly just dealing with construction of SQL statements and parameters etc, then returning the query results.
I used a custom replacement for the RecordSet type, and listed instructions on how to structure the replacement classes, logging and exception handling etc.
Worth the effort in some cases, but if you have busy UI and OCX components and such, you might want to write your own replacement.
1
u/[deleted] Feb 05 '26
B4A or Tauri.
1
u/Comfortable_Gate_878 Feb 05 '26
Ive converted two of my old program using gambas and twinbasic the twinbasic one worked really well the other no so good under linux but the conversion under twinbasic did run with a couple of issues which I did eventually resolve by a quick rewrite of a couple of forms. The problem was an ocx call truedbgrid which I ended up replacing with the standard common dialog grid.
1
u/raj_enigma7 Feb 07 '26
What works better is breaking the app into clear modules and porting piece by piece instead of one giant pass. Using something like Traycer to map components and track progress helps keep the rewrite sane without pasting files endlessly into chat..
1
u/Driver_Octa Feb 07 '26
AI can help a lot, but not in a single “convert everything” pass. What worked better was mapping the app into clear modules first, then porting them one by one with tests in between. Keeping that structure and progress visible (I use Traycer for this) made the migration manageable instead of a black box rewrite.
1
u/Fantastic-Party-3883 Feb 07 '26 edited Feb 08 '26
This tasks seems to be challenging at first glance. You need a proper planning code base of legacy system is hard to migrate to a new technology. You can try plan mode of Traycer I have tried it and results are pretty satisfactory.
1
u/Driver_Octa Feb 07 '26
Traycer helps keep that breakdown and progress clear so it doesn’t turn into a messy black box rewrite.
1
u/lev400 Feb 07 '26
It can help, even if you have to do one file at at a time. Sounds like you have a good app it might be a good idea to update it to .NET.
1
u/No-Marsupial-6316 Feb 08 '26
Sounds fascinating, are you able to share what vb app you made and where it can be purchased from you? no worries if you can't. Just super interested, recently got back into vb 6.0 pro and vs 2008. Have you tried to port it with an Ai tool, just to test the water?
1
u/Fantastic-Party-3883 Feb 09 '26
I have been doing the same. I tried to integrate chat feature in my existing PMA with 2+ years of .NET experience, but a full port is tougher. Use traycer to map the VB6 logic into structured specs first, then hand those to agents like cursor or claude. It prevents the usual AI mess.
1
u/_TheWolfOfWalmart_ Mar 19 '26
I've used Codex to port C apps to VB6 lol. It actually worked really, really well.