VB6用户文档迁移 [英] VB6 userdocument migration

查看:95
本文介绍了VB6用户文档迁移的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

道歉,另一个无能的VB6升级问题,为什么这件事不会死...



所以,我是一对开发人员的一半谁继承了完全用VB6编码的笨重的工资单应用程序。源代码的重量为50Mb的文本文件,共计90万行VB代码,加上11万行屏幕设计。它分布在290个UserDocuments,400个模块,740个类和290个表单中。它们共计360个程序,包括290个ActiveX可执行文件,60个标准可执行文件,6个DLL和3个控件。哪个访问和维护350个SQL服务器表。



我看到的大多数搜索结果都是关于升级单个程序的。我需要知道整个系统如何组合在一起。例如,我们有一个中央可执行文件,用于启动那些ActiveX可执行文件。我假设我们想要将UserDocuments转换为winforms,将旧的ActiveX可执行文件编译为标准可执行文件,并更改中央可执行文件以启动它们?



给定大小代码库,能够运行ActiveX可执行文件和来自同一中央程序的新.NET可执行文件会很好。这远程可能吗?那么VB6可以启动一个.NET可执行文件,还是VB.NET启动一个ActiveX可执行文件?



嗯,如果你没有说不出话来回答,请谈谈网格...

解决方案

我认为这些资源可能有所帮助 - 我想你会想要零碎地攻击系统......

在.NET中使用非托管(VB6)代码 [ ^ ]

M


摘录 [ ^ ](注意这是一个PDF下载)

其他想法...

你可以随时运行使用Process.Start的可执行文件,但我要警惕它们如何进行交叉通信(希望它是通过数据库完成的)。我们尝试了命名管道 [ ^ ]为此我认为最终使用< a href =https://msdn.microsoft.com/en-us/library/dd997372(v=vs.110).aspx>内存映射文件 [ ^ ]。在整个批次转换之前我离开了所以我不知道他们在VB6结束后完成了什么。

关于UserDocuments的耻辱 - 没有多少人走这条路,但我会同意转换它们。

注意 - 不要以为VB.NET是从VB6转换的明显选择因为相似性 - 我个人会去C#(虽然我怀疑你不要在这个问题上有很多选择)

引用:

让我们谈谈网格

Nooooooo!

由于大量使用自定义和第三方控件,我们无需担心网格问题。我的oppo最终编写了一个可编辑的网格控件,其中包含可变高度的行,可以在我们采用的C中配置前后颜色,只是为了保持UI看起来相同(ish)。


Apologies, yet another clueless VB6 upgrade question, why won't this thing just die ...

So, I'm half of a pair of developers who inherited a hulking payroll application coded entirely in VB6. The source code weighs in at 50Mb of text files, totaling 900 thousand lines of VB code, plus 110 thousand lines of screen design. This is spread over 290 UserDocuments, 400 modules, 740 classes, and 290 forms. These add up to 360 programs, comprising 290 ActiveX executables, 60 standard executables, 6 DLLs, and 3 controls. Which access and maintain 350 SQL server tables.

Most of the search results I see talk about upgrading a single program. I need to know how an entire system fits together. For example, we have a central executable, which launches those ActiveX executables. I assume we would want to convert the UserDocuments to winforms, compile the old ActiveX executables as standard executables, and change the central executable to launch those?

Given the size of the codebase, it would be nice to be able to run both the ActiveX executables, and the new .NET executables from the same central program. Is this remotely possible? So can either VB6 launch a .NET executable, or VB.NET launch an ActiveX executable?

Hm, if you answered that without breaking a sweat, let's talk about grids ...

解决方案

I think these resources might help - I'm thinking you would want to "attack" the system piecemeal...
Using Unmanaged (VB6) Code in .NET[^]
M


excerpt[^] (NB this is a PDF download)
Other thoughts...
You could always run the executables using Process.Start but I'd be wary of how they might be doing cross-communication (hopefully it's all through the database). We did experiment with named pipes[^] for this and I think eventually used memory mapped files[^]. I left before the whole lot got converted so I don't know what they finished up which after the VB6 had gone.
Shame about the UserDocuments - not many people went down that route, but I would agree to converting them.
Beware - Don't assume that VB.NET is the obvious choice for converting from VB6 just because of the "similarities" - I would personally go for C# (although I suspect you don't have much choice in the matter)

Quote:

let's talk about grids

Nooooooo!
We had no end of bother with grids as there had been heavy use of custom and 3rd party controls. My oppo ended up writing a editable grid-control with variable height rows that could have fore- and back colours configured in C that we took forward, just to keep the UI looking the same(ish).


这篇关于VB6用户文档迁移的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆