|
Unfortunately, I can't remember the site, but I was somewhere recently where the site notified me my flash player wasn't up to date. I use Chrome, so yeah.
|
|
|
|
|
I am converting a huge VB6 project to VB.net, VS2019.
I'm doing this mostly to learn VB.net. However, I don't want to refactor hundreds of thousands of lines of code. I have two questions.
First, have you ever done anything like this?
Second, do you know if anything that can do this? (Hopefully free).
ed
|
|
|
|
|
0: Find a download for VB 2008. It is the last version that has the VB6 migration tool.
1: Before migration, strip all the code except the event signatures from your forms/modules.
2: Paste back in the code, one event/proc at a time fixing things as you go.
"Go forth into the source" - Neal Morse
"Hope is contagious"
|
|
|
|
|
I gave up on the migration tool and went to steps 1 and 2, which works even for VS 2022. The biggest differences are in error handling and file i/o.
Error handling - leave any On Error Resume Next statements alone. Convert all On Error Goto statements to Try Catch Finally blocks.
Learn the new File Handling system. If you ever wrote file IO in VBScript you're ahead of the game on this as it's very similar.
|
|
|
|
|
|
I use "Read all" and "Write all" text methods to read and write directories of files to convert strings, add custom markup, etc; if that's your cup of team (writing interpreters / translators).
Just keep iterating over a typical program until it passes compile; then do the whole project.
Manipulating Files and Directories - Visual Basic | Microsoft Docs
"Before entering on an understanding, I have meditated for a long time, and have foreseen what might happen. It is not genius which reveals to me suddenly, secretly, what I have to say or to do in a circumstance unexpected by other people; it is reflection, it is meditation." - Napoleon I
|
|
|
|
|
I hope they are paying you good money to do this and lots of it.
Caveat Emptor.
"Progress doesn't come from early risers – progress is made by lazy men looking for easier ways to do things." Lazarus Long
|
|
|
|
|
Sadly, I am doing it for myself.
Beware what you think you want...
|
|
|
|
|
In this case, here's what I've learned doing this:
1) Build the new UI first, making sure all the controls that have events in VB6 are given the same names.
2) Set the event handler shells for each control
3) In the VB6 application, find each event handler and copy/paste the code, but not the handler's signature lines
4) Go through the new application and fix all the errors.
5) Go through the new application again looking for file IO. Change this from the VB6 style to using the StreamReader and StreamWriter accounts.
6) One last pass - look for any On Error Goto ... statements and replace them with Try Catch Finally blocks. You can leave On Error Resume Next statements alone on the assumption that this is the correct thing to do in this case.
Compile and debug.
|
|
|
|
|
I read somewhere a long time ago that someone thought since you're converting to .Net, it would be far more efficient to move to C# instead of converting to vb.net. You get access to geometrically more example code snippets, and have a much larger pool of people to which you can pose questions.
".45 ACP - because shooting twice is just silly" - JSOP, 2010 ----- You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010 ----- When you pry the gun from my cold dead hands, be careful - the barrel will be very hot. - JSOP, 2013
|
|
|
|
|
The solution is not free, but costs less than a port, and more importantly, it works, while a port may likely not.
Important question: What is "a huge application" for you?
How many man years of work?
The VB6 application I worked on was around 25 to 30 man years of work (3 to 5 devs from 1998 to 2014):
- 750 screens (.frm)
- 150 *classes" (.cls)
- 215 *modules* (.bas)
- 80 Crystal Reports
- 600 database tables
The VB6 application had reached the limits of a VB6 project: 32000 identifiers ("Out of Memory" errors in the VB6 IDE).
Most of the forms were more or less CRUD forms (add, edit, delete, etc.) for the corresponding database table, containing a lot of unnecessary copy/paste code.
A few forms (3) were more elaborated.
Technically, we needed to switch to another development tool, because we had reached the memory limits.
Then also, the potential clients needed a Web and Mobile app additionaly to the Desktop app.
More importantly, it was becoming hard to demo our old looking VB6 application.
In 2014, I proposed to rewrite the VB6 application with the DevExpress XAF "low code" framework.
The owner of the company I work for, didn't trust that it would be possible to rewrite the whole VB6 application for .NET.
He would have prefered to somehow "port" the VB6 app to VB.NET
With 100% certainty of failure for this, I would have quit the company.
So he accepted my proposition, and kept challenging me, by throwing at me additional projects while I was porting the legacy app.
To his surprise, all projects succeeded.
The new .NET application was developped in less than 2 years (from 2014 to 2016), covering most of our needs, ready for our customers:
- Complete rewrite in .NET.
- Available as a Desktop, Web and Mobile application.
- Modern look and feel.
- Incredibly flexible app, with many new features out of the box.
- Using the award wining UI components from an industry leader company.
modified 14-Mar-22 11:39am.
|
|
|
|
|
Hi All,
Well week 2 of monster commute done! I am now considered the anntena guru for the site as I got six anntena's tuned and ready to ship... Still no PC or email, so this weeks timesheet is not done! Also has anyone come across the Daves Garage channel on Boob Tube. An Ex-Microsoft guy who seems to tell the truth as to why things were done interesting.
|
|
|
|
|
Way to go guru! Thanks for reference, interesting guy.
Happy Saturday.
>64
Some days the dragon wins. Suck it up.
|
|
|
|
|
Yes, Dave Plumber, he created the Task Manager, he is our Windows users saviour!
|
|
|
|
|
I fine it interesting as I don't really program much anymore.
|
|
|
|
|
He also did the DOS compression (doublespace?) and various other Windows things, I think he mentioned Windows Activation and Zip folders, he mentioned he ported space cadet pinball to run on XP or NT/2000, and i'm sure there are loads more he has contributed, interesting channel especially for insights into MS back in the day.
|
|
|
|
|
Off Topic, your username, do you work for a certain building company whose name starts with a C? Just one of the guys there used something quite close for his email??
|
|
|
|
|
Nope, I think you might have asked me that before, despite the username I also don't work in a test department, which I think you were aiming at before too? Great minds I guess!
|
|
|
|
|
Sorry mind like a sive at times.
|
|
|
|
|
Haha, no worries, i'm the same!
|
|
|
|
|
|
I opened my account on Robinhood, but hesitated to use its app Plaid to fetch my fund directly from my bank account.
I concerned how this app Plaid can keep secure session into my bank account.
any experience to share on this Plaid app?
diligent hands rule....
modified 11-Mar-22 21:16pm.
|
|
|
|
|
I think you are on the right track.
I received a note from a doctor I had seen 15 years ago saying my SSN, name, b-day, etc had all been compromised.
I received another note from a mortgage holding company that had sold my loan to another company 12 years ago along the same lines.
Expect any info you share to be compromised, maybe much later.
|
|
|
|
|
About 4 years ago, I received a letter from the IRS telling me that someone had filed a false tax report. claiming a large refund, under my SSN. Seems that, in that instance, someone in the healthcare industry had sold some 50,000 SSN's. No damage done, but lesson learned. I don't do anything involving money with an app. Unfortunately, the bank now has only one of 6 teller windows personed when I go. They keep trying to tell me I should use a debit card to sign in and their App to do banking. I tell them I listened to Frank Abagnale and got rid of mine. My grandchildren shake their heads when they look at me.
>64
Some days the dragon wins. Suck it up.
|
|
|
|
|
I registered my account a month ago, but dare not to put funds there yet.
your lessons convinced me to close this account today.
diligent hands rule....
|
|
|
|