简体   繁体   English

在VB6中找出输出文件的路径

[英]Find out path of output file in VB6

Okay, I've been struggling with this for full last couple of hours. 好的,我在最后几个小时内一直在为此苦苦挣扎。 I have a Windows 7 32-bit installation, on which I'm trying to compile some old code. 我有Windows 7 32-bit安装程序,正在尝试在其上编译一些旧代码。 I do not have any working knowledge of VB , but I'm trying to build a VB6 project which is part of the code base. 我对VB没有任何工作知识,但是我正在尝试构建一个VB6项目,该项目是代码库的一部分。 The code compiles and when I run it after full-compile , it runs. 代码会编译,当我在full-compile后运行它时,它将运行。 But I can't seem to find where this file is. 但我似乎找不到此文件的位置。 Task manager shows VB6 as process. 任务管理器将VB6显示为进程。 It is not present in %TEMP% , and not in my project directory. 它不在%TEMP% ,也不在我的项目目录中。 Running an exhaustive search on my single drive configuration, I can find only one entry by this name, and this file has a timestamp older than current time. 在我的单个驱动器配置上进行详尽搜索,我只能用该名称找到一个条目,并且该文件的时间戳早于当前时间。 I attempted delete on this one while the debugger was still on breakpoint and it succeeded. 当调试器仍在breakpoint ,我尝试对此进行删除,并且此操作成功。 As last resort in prefetch directory, I deleted that entry also, but magically this file still runs when on VB6. 作为prefetch目录中的最后手段,我也删除了该条目,但神奇的是,此文件在VB6上仍可以运行。 What must have been going on? 到底是怎么回事?

When you run an application within the VB6 IDE, it entirely runs within the VB6 IDE. 当您在VB6 IDE中运行应用程序时,它完全在VB6 IDE中运行。 Unlike some other languages, it isn't creating an executable file and then running it separately while hooking a debugger up, it just starts running your code using the VB interpreter. 与其他一些语言不同,它不会创建可执行文件,然后在连接调试器时单独运行它,而只是开始使用VB解释器运行代码。

To create a standalone .exe file, you need to create it separately. 要创建一个独立的.exe文件,您需要单独创建它。 In the "File" menu, choose "Make projectname .exe". 在“文件”菜单,选择“制作项目名的.exe”。 For full details, see " Making and Running an Executable File " in the Visual Basic 6 Concepts guide. 有关完整的详细信息,请参见《 Visual Basic 6概念》指南中的“ 制作和运行可执行文件 ”。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM