|
Here is a step-by-step instruction how to install VB6 on Win10. The instructions actually work. And you can find the two CDs with VB in MSDN. It took me a while to get to this information:
Visual Basic Discussion Boards[^][^]
In MSDN search for: "Visual Basic 6.0 Enterprise "
The Visual Basic forum was more aggressive than helpful on the subject, but here is the link: Visual Basic Discussion Boards[^]
Advertise here – minimum three posts per day are guaranteed.
|
|
|
|
|
Sander Rossel wrote: I know there used to be converter tools around, but I've heard bad things about them.
They're usually not worth the effort. You don't want a converter. There were tools that let yuo integrate .NET into a VB6 app.
Interop Forms Toolkit 2.0 Tutorial[^]
A company I worked for tried a rewrite, and I was specifically told not to go the "slow transition route" by the software lead because it might kill the rewrite. That decision killed the company.
You rewrite critical parts. In a year, the VB6 crap will merely exist to display .NET modules. Then you start a new .NET host for those modules.
Before you do that, you'd want to migrate the database to something that makes more sense.
Yup, been there, got the TShirt. Go slow and steady. DB first, then VB a small victory at a time.
Bastard Programmer from Hell
"If you just follow the bacon Eddy, wherever it leads you, then you won't have to think about politics." -- Some Bell.
|
|
|
|
|
Eddy Vluggen wrote: Before you do that, you'd want to migrate the database to something that makes more sens
That would have been my suggestion also.
|
|
|
|
|
Having done exactly what you are asking about, here is how I approached the problem.
0: Strip all the code from your forms.
1: Use the converter from VB 2008 to upgrade the forms. (UI only)
2: Paste back in the code, proc by proc, fixing it as you go.
It's a long, slow, boring process.
There's also a company called mobilize.net that I've looked into that seem to do a really good job at migrating VB6 to .Net. Good luck!
"Go forth into the source" - Neal Morse
"Hope is contagious"
|
|
|
|
|
Sounds like a good time to also review the overall design, make more modular, do some TDD/unit tests, etc.
Sell them on positives....
|
|
|
|
|
My experience is to create the new dotNet VB application from scratch. Use the VB6 source as a guide to what needs to be done. In some cases, I discovered that if I copy/paste the VB6 source into the project and then fix that source it worked wonders.
Gotchas:
- File IO - classic VB file handling is there, but using the new StreamReader and StreamWriter classes are far more efficient
- Event handlers, but at least VB.Net makes these explicit in the code. The order of event firing is different from VB6.
- Error handling: You can leave in the VB6 error handling but I strongly recommend you switch to the Try Catch Finally End Try constructs. I have a few short Subs and Functions where I legitimately use On Error Resume Next, but I document why I'm using this construct.
|
|
|
|
|
look at this post, it may give your ideas...
diligent hands rule....
|
|
|
|
|
You are better off leaving the existing application as VB6 and just do the change to the database layer, VB6 still works perfectly and will continue to do so for a long time.
Then just develop new features in .net when required.
We spent about 5 man years converting one of our applications to VB.Net and now its just as (not)supported by Microsoft as VB6.
|
|
|
|
|
Interesting answer. Really depends on a system analysis but you could be right. That said, VB6 is slated to possibly bite the dust in 10 or so years. Better long-term planning might be to gradually move it to some other platform. It's pretty easy to maintain DB compatibility with multiple platforms.
I don't see VB.net "just as not supported by MS" at all. I'm not saying I wouldn't choose something different, but VB support in VS22 seems to be pretty solid.
|
|
|
|
|
My company in a migration process from VB6 right now.
First things first. I don't know anything about you application so anything said down here may not be relevant.
My company have many million lines of code in VB6 and VBA compatible scripting language in the 3 main application. All of the are using the same core written in VB6.
We started the migration 2.5 years ago.
The process is like this.
1. Write a server side C# code and connect old UI to the new (C#, .NET Core 3.1, now upgraded to .NET 6).
1.1. Create core for "migrateable" components.
1.1.1. Connect server-side components to the old UI.
1.2. Migrate those components.
2. Create the new UI (C#, .NET 6, WPF).
2.1. Create core client-side components to show server-side components.
2.2. Migrate client-side UI components.
2.3. Create the tooling.
Many processes are parallel.
The smallest of the 3 main projects will be fully migrated at the end of this year.
The second one is planned to be ready at the end of next year.
Biggest biggest project is planned to be ready in 3 years (likely it will be 5 years).
The good news is that whatever is migrated is used by the customers already.
|
|
|
|
|
We had to do what you have to do big time. But with todays knowledge, I would like to encourage you questioning not only VB.Net vs C#. Depending on the charactor of the application, having a Web Application might be worth thinking about. You may want to have a look at JMIX which is a Java Framework on top of Spring Boot which gives you almost the easy of good old VB6. It gifts you with all the typical features of a modern application and the sample apps they offer could be a good starting point for modifying them to cover the functionality you need. No, I am not getting paid by those folks ... and I am still a strong supporter of VB (adopted it starting at Version 1.0). But now I heavily rely on JMIX and Windows getting independent from operating systems.
|
|
|
|
|
I have done this before, and how well it goes depends a lot on how good an engineer the person doing the conversion is.
Put enough time and planning into the design you want to go to. Use value engineering to determine what has the most value in the conversion process.
Don’t just replicate how the business rules are implemented. Migrate them using newer features where there is value in doing so.
The more the VB code used OO techniques (available in VB4 - VB6), the easier your job will be. Don’t try to replicate VB procedural programming design in C#.
Are your users desktop or browser? Determine the relative SDLC costs between WinForms and Blazor. Development time is less and performance is better with WinForms than any web-based GUI, but deployment costs may be higher. If you choose a web-based GUI, go with Blazor, not the Javascript-based approach. You’ll have less development time, better performance, and fewer headaches.
Don’t farm out the work to consultants, H1-B developers, or offshore developers. The end result will need a lot of repair and be more expensive to maintain.
Make sure to use someone in-house who is experienced in VB6 and in C#/.NET. A successful port will depend on deeply understanding both.
One last thing - VB6 can host C# DLLs, including user controls for the VB6 GUI, all written in pure C#, using COM Interop. I did this a while back and it works beautifully if the developer understands both C# COM Interop and how VB6 recognizes classes, interfaces, and events. That allowed us to migrate the app from VB6 to fully C# piece by piece, without wasted code.
Best of luck to you!
|
|
|
|
|
>Quote: Ideally, I'd rather just rewrite everything to web-based and cloud-ready .NET 6 applications, but I don't think we'll have the time nor money
Well, do it right the first time, or you will spend more time and more money to do the rewrite of the rewrite, or worse, the rewrite of the converted mess. Speaking from personal experience.....
|
|
|
|
|
You answered your own question. Re-write.
Whether you need to go to web-based is a solution analysis; there are very valid reasons that desktop apps may provide a better solution than web-based or a hybrid mix of both may be the solution. We started with a large conversion that was going to be all desktop but ends up having some web-based modules where they made sense. Those are mostly parts having existing functionality on the web where some redesign can make the apps usable for in-house applications.
Convert? We moved Access to Postgres in the original VB6 code using ODBC as the first step. I wouldn't spend any time looking at "converters". First, none will do a decent job converting VB6 to VS22. The best you'd get is having to do a multistep conversion that will still leave a lot of broken functionality. If native printing was used in VB6, and I think most did, there can be a lot of work recreating documents to VS. Depending on the size and budget, that may be a place to look at a paid tool to do that function or play with an html2pdf in VS or as a web service, locally or cloud.
I would also look into the chance that some existing SaaS products can replace and integrate functionality.
If it's feasible, I would phase the transition by moving functions to your new platform while leaving others in VB6 for now. A lot of that depends on your client's ability to work with that and if you do end up moving to the web/cloud for some or all of the project. That serves to spread the money out over time which may help.
Depending on the codebase and your available resources, it could be a long road.
|
|
|
|
|
My company is currently taking our primary VB6 app (serves 100s of clients via RDS RemoteApps) and is converting to .net6 backend / vue frontend.
We first looked at all the tools that have been mentioned so far. We would have been happy to stay a desktop app if we could have converted from VB6.
In each case the use use of 3rd party controls (grids, drop downs, calendars, etc.) pretty much killed each of those options.
I am bringing it up as a warning, so you are aware of a possible impediment.
We could have attempted to convert and recoded to an updated front end, we chose not to after testing. For us the rough calculation didn't make sense to attempt to convert.
VB6 and Crystal Reports were often used together. You didn't mention if CR is part of your project.
We also use Crystal Reports for about 125 reports. About 15 of them are complex enough that we can't easily depracate CR. We came up with a way to host CR in container to save having a separate .net framework VM.
|
|
|
|
|
I had to migrate several projects from 6 to .NET back when. I found re-writing was pretty straightforward, the only thing that really slowed me up was not being able to use arrays of controls (which the VB6 projects used extensively). Worked out a work-around (which needed much more coding, but ran eventually). Good luck.
|
|
|
|
|
Pull out sketch first - letter learner to start with (10)
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
"Common sense is so rare these days, it should be classified as a super power" - Random T-shirt
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
In a closed society where everybody's guilty, the only crime is getting caught. In a world of thieves, the only final sin is stupidity. - Hunter S Thompson - RIP
|
|
|
|
|
Wordle 649 4/6
⬜⬜⬜⬜🟨
⬜🟩🟩🟩⬜
🟩🟩🟩🟩⬜
🟩🟩🟩🟩🟩
|
|
|
|
|
Wordle 649 2/6
⬛🟩🟨⬛🟨
🟩🟩🟩🟩🟩
|
|
|
|
|
Wordle 649 5/6
🟨⬜⬜⬜⬜
⬜⬜🟩⬜⬜
⬜🟩🟩🟩⬜
⬜🟩🟩🟩⬜
🟩🟩🟩🟩🟩
|
|
|
|
|
Wordle 649 3/6*
🟨🟩⬜⬜🟨
⬜🟩🟩🟩🟩
🟩🟩🟩🟩🟩
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
"Common sense is so rare these days, it should be classified as a super power" - Random T-shirt
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
Wordle 649 4/6
🟨🟨🟨⬛⬛
🟨⬛⬛⬛⬛
⬛🟩🟩🟩🟩
🟩🟩🟩🟩🟩
Nice, I could have gotten it in 3. This has been fast and straightforward.
GCS/GE d--(d) s-/+ a C+++ U+++ P-- L+@ E-- W+++ N+ o+ K- w+++ O? M-- V? PS+ PE Y+ PGP t+ 5? X R+++ tv-- b+(+++) DI+++ D++ G e++ h--- r+++ y+++* Weapons extension: ma- k++ F+2 X
|
|
|
|
|
Wordle 649 3/6
⬜🟩🟨⬜🟨
⬜🟩🟩🟩🟩
🟩🟩🟩🟩🟩
In a closed society where everybody's guilty, the only crime is getting caught. In a world of thieves, the only final sin is stupidity. - Hunter S Thompson - RIP
|
|
|
|
|
Wordle 649 4/6*
⬜⬜🟩🟩⬜
⬜⬜🟩🟩⬜
🟨🟩🟩🟩⬜
🟩🟩🟩🟩🟩
Happiness will never come to those who fail to appreciate what they already have. -Anon
|
|
|
|