VB6中的独立EXE [英] Standalone EXE in VB6

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

问题描述

我需要创建一个真正独立的EXE。通过这种方式,我的意思是

可执行文件是应用程序运行所需的全部内容。我的应用程序

有一个按钮可以激活一个公共控件(选择一个文件),这个

似乎是我的绊脚石。当我尝试在另一台

机器上运行我的程序时,它抱怨comdlg32.ocx没有正确注册。


创建我自己的表单并写我自己的代码来浏览一个文件,

可以VB6创建一个完全自包含的EXE,它使用一个通用控件,并且可以简单地运行而不需要程序要安装?这是

建议我VB6是我需要的(之前使用的是VB5),所以

我买了一个旧的VB6 Enterprise副本,特别适用于这个场合。我被误导了吗?


-

乔治

"你可以挂外面整天都在阳光下扔球,或者你可以坐在你的电脑前做一些重要事情。 - Eric Cartman - 4

2006年10月

I need to create an EXE that is truly "standalone". By that, I mean the
executable file is all that''s required for the application to run. My app
has a button that fires up a common control (to select a file), and this
seems to be my stumbling block. When I try to run my program on another
machine, it complains that comdlg32.ocx is not registered properly.

Short of creating my own form and writing my own code to browse for a file,
can VB6 create a fully self-contained EXE that uses a common control and can
simply be run without the need for the program to be installed? It was
suggested to me that VB6 was what I needed (was using VB5 prior to now), so
I bought an old copy of VB6 Enterprise especially for the occasion. Have I
been misled?

--
George
"You can just hang outside in the sun all day tossing a ball around, or you
can sit at your computer and do something that matters." - Eric Cartman - 4
October 2006

推荐答案

" Wog * George" < wo ******************* @ amd-p.com>'s wild

想法于2006年12月20日星期三发布格林尼治标准时间11:32:18

带有以下成果:
"Wog*George" <wo*******************@amd-p.com>''s wild
thoughts were released on Wed, 20 Dec 2006 11:32:18 GMT
bearing the following fruit:

>我需要创建一个真正独立的EXE。 。通过这种方式,我的意思是
可执行文件是应用程序运行所需的全部内容。我的应用程序
有一个按钮,可以激活一个公共控件(选择一个文件),这似乎是我的绊脚石。当我尝试在另一台机器上运行我的程序时,它抱怨comdlg32.ocx未正确注册。

创建自己的表单并编写自己的代码以浏览文件,
VB6可以创建一个完全独立的EXE,它使用通用控件,只需运行而无需安装程序吗?有人告诉我VB6是我需要的(之前使用的是VB5),所以
我特意为这个场合买了一份VB6 Enterprise的旧版本。我被误导了吗?
>I need to create an EXE that is truly "standalone". By that, I mean the
executable file is all that''s required for the application to run. My app
has a button that fires up a common control (to select a file), and this
seems to be my stumbling block. When I try to run my program on another
machine, it complains that comdlg32.ocx is not registered properly.

Short of creating my own form and writing my own code to browse for a file,
can VB6 create a fully self-contained EXE that uses a common control and can
simply be run without the need for the program to be installed? It was
suggested to me that VB6 was what I needed (was using VB5 prior to now), so
I bought an old copy of VB6 Enterprise especially for the occasion. Have I
been misled?



你一直误导。


你对创建安装程序有什么看法?


Jan Hyde(VB MVP)


-

Aorta:你应该做的事情。 (Stan Kegel)

You''ve been mislead.

What do you have against creating a setup program though?

Jan Hyde (VB MVP)

--
Aorta: Something you should do. (Stan Kegel)


Wog George写道:
Wog George wrote:

我需要创建一个EXE是真正的独立。通过这种方式,我的意思是

可执行文件是应用程序运行所需的全部内容。我的应用程序

有一个按钮可以激活一个公共控件(选择一个文件),这个

似乎是我的绊脚石。当我尝试在另一台

机器上运行我的程序时,它抱怨comdlg32.ocx没有正确注册。


创建我自己的表单并写我自己的代码来浏览一个文件,

可以VB6创建一个完全自包含的EXE,它使用一个通用控件,并且可以简单地运行而不需要程序要安装?这是

建议我VB6是我需要的(之前使用的是VB5),所以

我买了一个旧的VB6 Enterprise副本,特别适用于这个场合。我被误导了吗?
I need to create an EXE that is truly "standalone". By that, I mean the
executable file is all that''s required for the application to run. My app
has a button that fires up a common control (to select a file), and this
seems to be my stumbling block. When I try to run my program on another
machine, it complains that comdlg32.ocx is not registered properly.

Short of creating my own form and writing my own code to browse for a file,
can VB6 create a fully self-contained EXE that uses a common control and can
simply be run without the need for the program to be installed? It was
suggested to me that VB6 was what I needed (was using VB5 prior to now), so
I bought an old copy of VB6 Enterprise especially for the occasion. Have I
been misled?



公共控件与通用对话框不同。

文件浏览对话框是后者之一,更容易创建<没有OCX而不是常见控件的



有很多例子直接使用Common Dialog API:
http://www.google.com/search?hl = en& q ... mon + dialog + api


请注意,在VB6中创建的任何EXE仍然依赖于

VB6运行时,但它们现在几乎存在于每台计算机上

(默认情况下包含在XP及以上版本)


-

Dean Earley(de*********@icode.co.uk)

i-Catcher开发团队

iCode系统

Common Controls is NOT the same as Common Dialogs.
The file browse dialog is one of the latter and a LOT easier to create
without the OCX than a common Control is.

There are plenty of examples that use the Common Dialog API directly:
http://www.google.com/search?hl=en&q...mon+dialog+api

Please note that any EXE created in VB6 still has a dependency on the
VB6 runtimes, but they exist on pretty much every computer now anyway
(and are included by default on XP and above)

--
Dean Earley (de*********@icode.co.uk)
i-Catcher Development Team

iCode Systems


Wog George写道:
Wog George wrote:

我需要创建一个真正独立的EXE UOT ;.通过这种方式,我的意思是

可执行文件是应用程序运行所需的全部内容。
I need to create an EXE that is truly "standalone". By that, I mean the
executable file is all that''s required for the application to run.



由于VB6可执行文件至少需要MSVBVM60.DLL,这是不可能的。

但是,如果你把这个DLL放在同一个目录作为可执行文件(或在
另一个搜索执行的路径,如C:\ windows \),它将运行
。因此,您可以在VB6中编写安装程序而无需安装

安装程序。

也就是说,如果程序员没有添加任何其他依赖项。麻烦

,IDE有时会在没有警告你的情况下添加依赖项。只需

检查项目属性并删除任何你不需要的东西。

As a VB6 executable will at least need MSVBVM60.DLL, this is impossible.
BUT, if you put this DLL in the same directory as the executable (or in
another path that is searched for execution, like C:\windows\), it will
run. So you can write an installer in VB6 without having to install your
installer.
That is, if the programmer did not add any other dependencies. Trouble
is, that the IDE sometimes adds dependencies without warning you. Just
check the project properties and remove anything you will not need.


我的应用

有一个按钮这会激发一个共同的控制(选择一个文件),这个

似乎是我的绊脚石。当我尝试在另一台

机器上运行我的程序时,它抱怨comdlg32.ocx没有正确注册。
My app
has a button that fires up a common control (to select a file), and this
seems to be my stumbling block. When I try to run my program on another
machine, it complains that comdlg32.ocx is not registered properly.



如果将对象用于文件对话框,则确实存在依赖关系。你可以通过使用API​​调用代替CommonDialog控件来避免这种情况。

并为自己省去很多麻烦。

If you use an object for a file dialog, you do have a dependency. You
can avoid this by using an API call instead of a CommonDialog control
and save yourself a lot of troubles.


创建我自己的表单并编写自己的代码以浏览文件之前,没有... b $ b VB6可以创建一个使用通用控件的完全自包含的EXE并且可以

只需运行而无需安装程序?这是

建议我VB6是我需要的(之前使用的是VB5),所以

我买了一个旧的VB6 Enterprise副本,特别适用于这个场合。我被误导了吗?
Short of creating my own form and writing my own code to browse for a file,
can VB6 create a fully self-contained EXE that uses a common control and can
simply be run without the need for the program to be installed? It was
suggested to me that VB6 was what I needed (was using VB5 prior to now), so
I bought an old copy of VB6 Enterprise especially for the occasion. Have I
been misled?



可能。在这方面,VB5和VB6之间没有什么区别。


最好的问候

Probably. There''s little difference between VB5 and VB6 in this respect.

Best regards


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

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