vb.net 如何使用visual studio.net打开visual basic 6程序
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/14329954/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
How to open visual basic 6 program with visual studio.net
提问by Asad Waheed
I want to open a program (written in Visual basic 6) to be open in Visual Studio.net. Please guide, how could I do that?
我想打开一个要在 Visual Studio.net 中打开的程序(用 Visual Basic 6 编写)。请指导,我该怎么做?
While trying to open VB6 (.vbp file) program directly from the OPEN project option in visual studion.net, I was getting this error,
尝试直接从 Visual studion.net 中的 OPEN 项目选项打开 VB6(.vbp 文件)程序时,出现此错误,
"Visual Basic 6 (.vbp) files cannot be opened in Visual Studio"
“无法在 Visual Studio 中打开 Visual Basic 6 (.vbp) 文件”
回答by alstonp
I am trying to open in VS 2010.
我正在尝试在 VS 2010 中打开。
Visual Studio 2010 does not support VB6 projects. See the link here
Visual Studio 2010 不支持 VB6 项目。请参阅此处的链接
From the msdn documentation:
Visual Studio 2010 does not provide tools for upgrading applications and projects from Visual Basic 6.0. If you want to upgrade your project from Visual Basic 6.0 to Visual Basic 2010, you can use the upgrade tools provided with earlier versions of Visual Studio and then upgrade the project again in Visual Studio 2010.
Visual Studio 2010 不提供用于从 Visual Basic 6.0 升级应用程序和项目的工具。如果要将项目从 Visual Basic 6.0 升级到 Visual Basic 2010,可以使用 Visual Studio 早期版本提供的升级工具,然后在 Visual Studio 2010 中再次升级项目。
回答by Dhiliban
Speaking from my Experience, its not easy to open a Visual Basic 6.0 project in any Versions of Visual Studio above 2008.
根据我的经验,在 2008 年以上的任何版本的 Visual Studio 中打开 Visual Basic 6.0 项目都不容易。
Although 2008 and below version provide an automatic function to convert Vb6 code to VB.net framework. But the problem starts after the conversion, it Skips some code, add function/variables on its own, or modify the functional behavior on its own, with it the VB.proj will be created with error and you will not be able to open it anywhere as solution file. 3rd party tools also the same.
尽管 2008 及以下版本提供了将 Vb6 代码转换为 VB.net 框架的自动功能。但是转换之后问题就开始了,它跳过一些代码,自己添加函数/变量,或者自己修改函数行为,这样会导致VB.proj创建错误,您将无法打开它任何地方作为解决方案文件。3rd 方工具也一样。
If you want to open the VB6 code try Visual Basic 6.0 Portable edition. But headache will still follow you there, please refer this link Installation of VB6 on Windows 7 (or Windows 8) (or Windows 10)
如果您想打开 VB6 代码,请尝试 Visual Basic 6.0 Portable edition。但是头痛仍然会跟着你,请参考这个链接 Installation of VB6 on Windows 7 (or Windows 8) (or Windows 10)
回答by Brandon Boone
There's a plugin called Visual Basic Tools for Visual Studiothat provides the following features:
有一个名为Visual Basic Tools for Visual Studio的插件,它提供以下功能:
load classic VB workspace- and project-files and offers quick access to the extension′s options
integrates with the solution explorer and the code editor having support for syntax highlighting, basic outlining (allows to expand/collapse methods, properties and types) as well as navigation bar support.
Classes, Types, Modules, Forms and Controls can be inspected using the Object Browser and Class View.
加载经典的 VB 工作区和项目文件,并提供对扩展选项的快速访问
与解决方案资源管理器和代码编辑器集成,支持语法突出显示、基本大纲(允许展开/折叠方法、属性和类型)以及导航栏支持。
可以使用对象浏览器和类视图检查类、类型、模块、表单和控件。
From the reading, it's unclear if you can actually build the project, though it does say:
从阅读中,不清楚您是否可以真正构建该项目,尽管它确实说:
The import tool creates a new solution and MSBuild compatible projects.
导入工具会创建一个新的解决方案和 MSBuild 兼容项目。
回答by ???ěxě?
Make sure you are clicking on the project file itself... Right click on the file and select "Open With" and select your visual studio program. It may need to be converted and if so, it will prompt you to convert the project.
确保您单击的是项目文件本身...右键单击该文件并选择“打开方式”并选择您的 Visual Studio 程序。它可能需要转换,如果是这样,它会提示您转换项目。
Thanks!
谢谢!
回答by Hillary Otati
Download Visual Basic Tools for Visual Studio,allows to work with classic VB workspaces and projects
下载用于 Visual Studio 的 Visual Basic 工具,允许使用经典的 VB 工作区和项目