如何在页面上的每个子功能下对VB6源代码进行编目,索引和/或打印? [英] How can I catalog, index, and/or print VB6 source code, with each sub/function on a page..?

查看:92
本文介绍了如何在页面上的每个子功能下对VB6源代码进行编目,索引和/或打印?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在每个子项或函数的单独页面上对VB6源代码进行编目,索引和/或打印?如果可能的话,我想使用免费的或随附的Visual Studio外接程序来这样做,但是我并不反对自己编写东西.我熟悉用于应用程序可扩展性的Microsoft Office Visual Basic",并且似乎VB6具有类似的模块,这可能使我可以简单地通过代码模块集合按每个"将子对象扔到打印机上.时间.这可能需要10到15行代码.

How can I catalog, index, and/or print VB6 source code with each sub or function on its own page..? I would like to do so with free or included Visual Studio Add-Ins if possible, but I'm not adverse to writing something myself. I'm familiar with "Microsoft Office Visual Basic for Applications Extensibility", and it seems that VB6 has a similar module, which may allow me to simply "For Each" through the code module collection and throw the subs at the printer one at a time. It would take maybe 10-15 lines of code.

我的首要任务是打印,最好是每个子功能都在其自己的页面上,但是使用IDE的常规打印功能,所有代码都可以在一个较长的打印输出中一起运行.接下来,我想为每个VBP中的每个子,函数,变量和常量的名称创建一个索引/目录.我们拥有Visual Studio 6.0 Enterprise Edition,但似乎没有任何东西可以做任何这类事情.

My first priority is the printing, preferably with each sub/function on its own page, but with the normal print function of the IDE, all the code runs together in one long printout. Next after that, I would like to create an index/toc of the names of every sub, function, variable, and constant in each VBP. We have the Visual Studio 6.0 Enterprise Edition, but there does not seem to be anything in it to do any of these kinds of things.

您可能会笑着问为什么VB6 .. ??大声笑!".这是因为我受命负责运行工厂的大型软件系统的VB6源代码的升级和更改.它位于与外界没有连接的隔离网络上,已经运行了14年,但是现在他们希望开始升级某些东西.该系统由许多VBP文件组成,每个文件都有许多模块和形式.

You may laugh and ask, "Why VB6..?? LOL!!". It's because I've been tasked with upgrades and changes to VB6 source code of a large software system that runs a factory. It's on an isolated network with no connection to the outside world, and it's been running fine for 14 years, but now they want to start upgrading some things. The system is composed of many VBP files, each with many modules and forms.

我确实尝试使用Google搜索来找到答案,但是事实证明这是不可能的.我所得到的只是关于用VB6编写的应用程序进行打印的示例代码,而不是从IDE中打印源代码的代码.

I did try Googling for answers to this, but that proved impossible. All I got was coded samples about printing from apps written in VB6, not printing the source code from the IDE.

推荐答案

您不需要正确地解析代码即可满足您的要求.自己写点东西.您可以输出到打印机或HTML文件.我做了一次,效果很好.

You don't need to properly parse the code to meet your requirements. Write something yourself. You could output to a printer or to HTML files. I did this once, it worked fine.

源代码文件只是文本文件.逐行读取文件,打印每一行.每当您看到结束子"或结束功能"或结束属性"时,就开始一个新页面.这样,每种方法将在单独的页面上开始. FRM文件的顶部具有控件定义,您可以通过仅查找仅包含"end"的行来跳过该定义.代码从此处开始.

The source code files are just text files. Read the files line by line, printing each line. Start a new page every time you see "end sub" or "end function" or "end property". That way each method will start on a separate page. FRM files have control definitions at the top, you can skip that by just looking for a line containing only "end". The code starts there.

如果您正在大量使用VB6,我还建议您添加 MZ工具.它具有出色的搜索工具.不幸的是,它不再免费了,但是值得我恕我直言.我没有与供应商的链接.

If you are doing a lot of VB6 I also recommend getting the brilliant add in MZ Tools. It has excellent search tools. Unfortunately no longer free, but worth the money IMHO. I have no links with the vendor.

这篇关于如何在页面上的每个子功能下对VB6源代码进行编目,索引和/或打印?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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