How to get a VB3 program working on Windows 7?
Many years ago I wrote a system for a customer using VB3 - or maybe VB5 or 6? Can't remember... it really was that long ago开发者_JAVA技巧.
Anyway, they've been using this program happily all these years, including through an office-wide upgrade from Windows 95 to XP - but now they want to upgrade their office computers to Windows 7. Sensibly they tried upgrading one computer first and reinstalling my program - and it didn't work.
Is there any quick-fix to get this legacy software working on Windows 7? Or do they really require a rewrite of the whole program in order to be able to use it?
If it's Visual Basic 3.0 as you state here, then it may not run natively on Windows 7. You'll need to use the Windows 7 Virtual XP Mode if you are to run your application. VB 6.0 on the other hand should run on Windows 7, see support statement here.
You can run VB3 programs unchanged on Windows 7, 8, 8.1 and 10 with relatively few problems. I normally run them in XP-SP3 compatability mode. I have quite a few old VB3 programs running this way. VB3 programs are 16-bit though and will only run on 32-bit versions of windows Vista/7/8/10 so if you've got a 64-bit windows then you can't run them unless you use XP-Mode (only available in Windows 7) or set up a Virtual Windows XP using VMWare Player or VirtualBox or similar. I have done this on my own Win-10 64-bit PC where I have VMWare Workstation set up with XP, Win-7-32, Win-7-64, Win-8-32, Win-8-64 and Win-10-32 virtual machines which I run when required.
As for converting Vb3 programs to VB4 (32-bit), VB5 or VB6 - yes you can just open them in the new IDE and recompile them and they should work OK.
EXCEPT
If you have used any 3rd party VBX or DLL files in your Vb3 program then you'll have to get 32-bit versions of these controls although similar controls may exist already as Microsoft standard controls.
I used Apex TrueGrid quite a lot as a grid bound to a a data control for processing SQL queries and returning the results. I needed to upgrade to TrueDBGrid. However I have now found that the standard VB6 Microsoft MSFlexGrid has all of the functionality that I used in the old TrueGrid control so I have now replaced the TrueDBGrids with MSFlexGrids. The properties and methods are different and I had to recode for that but most of this was in standard subroutines used for all of the grids so I only needed to do most changes once for all of the grids.
The biggest hassle is that when you upgrade the controls from VB3 to VB4/5/6 the new controls often have the same properties but with different names and different parameters or sometimes some of the functionality isn't there and you have to find a work around. Or you may have to use a different control with lots of code changes to support the new control.
I have several VB3 programs with over 1,000,000 lines of code jointly which only JUST run because I keep running out of resources and memory etc. I can't add in any more functionality because if I do the program won't compile or won't run.
I tried converting these from VB3 to VB6 but got some many errors that I ended up rewriting a lot of it from scratch. I tried converting these several times over the years but once you've at least "sort of" converted them you then have to try to run them and when you get that happening then you have to try to compile them. I actually wrote a VB6 program to read the VB3 source code and make as many changes as I possibly could automatically. One area where you can't do this is for the control customisation data held in the *.FRX file as these are binary and undocumented. This is where I cam unstuck ... load program, run, get an error, correct that one error, save, run, get an error, correct that one error, save, run, get an error, correct that one error, save, run, get an error, correct that one error, save, run etc You only get to see one error at a time and there were thousands of compiler errors in the converted code. I usually gave up after spending days trying to get rid of these errors one by one. I may have even got to just ONE error away from completion - but you can't tell that - you only know when you're actually finished.
精彩评论