如何让 VB3 程序在 Windows 7 上运行?

发布于 2024-10-04 22:20:12 字数 275 浏览 5 评论 0原文

许多年前,我使用 VB3 或 VB5 或 6 为客户编写了一个系统?不记得了……确实是那么久以前的事了。

不管怎样,这些年来他们一直在愉快地使用这个程序,包括在整个办公室范围内从 Windows 95 升级到 XP - 但现在他们想将办公室计算机升级到 Windows 7。显然,他们尝试先升级一台计算机,然后重新安装我的计算机。程序 - 但它不起作用。

有没有任何快速修复方法可以让这个旧版软件在 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.

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?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

饮湿 2024-10-11 22:20:12

如果您在此处声明的是 Visual Basic 3.0,则它可能无法在 Windows 7 上本机运行。 aspx" rel="nofollow">Windows 7 虚拟 XP 模式(如果您要运行应用程序)。另一方面,VB 6.0 应该在 Windows 7 上运行,请参阅支持声明

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.

篱下浅笙歌 2024-10-11 22:20:12

您可以在 Windows 7、8、8.1 和 10 上运行 VB3 程序,而问题相对较少。我通常在 XP-SP3 兼容模式下运行它们。我有很多旧的 VB3 程序都是这样运行的。
VB3 程序是 16 位的,只能在 32 位版本的 Windows Vista/7/8/10 上运行,因此如果您有 64 位 Windows,则无法运行它们,除非您使用 XP-Mode (仅在 Windows 7 中可用)或使用 VMWare Player 或 VirtualBox 或类似工具设置虚拟 Windows XP。我在自己的 Win-10 64 位 PC 上完成了此操作,其中安装了 XP、Win-7-32、Win-7-64、Win-8-32、Win-8-64 和 Win-我在需要时运行 10-32 个虚拟机。

至于将 Vb3 程序转换为 VB4(32 位)、VB5 或 VB6 - 是的,您可以在新的 IDE 中打开它们并重新编译它们,它们应该可以正常工作。

除非

您在 Vb3 程序中使用了任何第 3 方 VBX 或 DLL 文件,那么您必须获得这些控件的 32 位版本,尽管类似的控件可能已经作为 Microsoft 标准控件存在。

我经常使用 Apex TrueGrid 作为绑定到数据控件的网格,用于处理 SQL 查询并返回结果。我需要升级到 TrueDBGrid。然而,我现在发现标准 VB6 Microsoft MSFlexGrid 具有我在旧 TrueGrid 控件中使用的所有功能,因此我现在已将 TrueDBGrids 替换为 MSFlexGrids。属性和方法是不同的,我必须为此重新编码,但其中大部分是在用于所有网格的标准子例程中,因此我只需要对所有网格进行一次大部分更改。

最大的麻烦是,当您将控件从VB3升级到VB4/5/6时,新控件通常具有相同的属性,但具有不同的名称和不同的参数,或者有时某些功能不存在,您必须找到一个工作大约。或者您可能必须使用不同的控件并进行大量代码更改才能支持新控件。

我有几个 VB3 程序,联合代码超过 1,000,000 行,它们只能运行,因为我一直耗尽资源和内存等。我无法添加任何更多功能,因为如果我这样做,程序将无法编译或不会跑步。

我尝试将它们从 VB3 转换为 VB6,但遇到了很多错误,最终我从头开始重写了很多内容。多年来我尝试多次转换它们,但是一旦你至少“有点”转换了它们,你就必须尝试运行它们,当你发生这种情况时,你必须尝试编译它们。实际上,我编写了一个 VB6 程序来读取 VB3 源代码并自动进行尽可能多的更改。您无法执行此操作的一个区域是 *.FRX 文件中保存的控件自定义数据,因为这些数据是二进制且未记录的。这就是我脱困的地方......
加载程序,运行,出现错误,更正该错误,保存,
运行,出现错误,更正该错误,保存,
运行,出现错误,更正该错误,保存,
运行,出现错误,更正该错误,保存,运行等
您一次只能看到一个错误,并且转换后的代码中存在数千个编译器错误。我通常会在花了几天时间尝试一一消除这些错误后放弃。我什至可能只差一个错误就完成了——但你无法说出来——你只知道你什么时候真正完成了。

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文