标准包含文件 [英] Standard Include Files

查看:61
本文介绍了标准包含文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我的vb6应用程序中,我有一组标准模块,我包含在我的所有应用程序中。但是,当我升级现有应用程序时,它会在应用程序目录中创建这些模块的副本。问题是我无法将这些文件移动到标准位置,然后将我的所有应用程序指向此位置。我查看了不同的新闻组,我找到的最接近的解决方案是使用继承。此解决方案适用于一次又一次地使用标准表单,但是当您想要一次又一次地使用标准模块时似乎不能正常工作。有什么建议吗?

解决方案

为什么不把所有这些类/模块都放在一个dll中并引用那个dll在

all你的申请?


多米尼克

" mike" <一个******* @ discussions.microsoft.com>在消息中写道

新闻:0A ********************************** @ microsof t.com ...

在我的vb6应用程序中,我有一套标准模块,我包含在所有



我的应用程序中。但是,当我升级现有应用程序时,它会在应用程序目录中创建这些模块的副本

。问题是我不能将这些文件移动到标准位置,然后将我的所有应用程序指向

这个位置。我查看了不同的新闻组和最接近的解决方案

我发现是使用继承。这个解决方案适用于一次又一次地使用

标准格式,但是当你想要一次又一次地使用标准模块时,它似乎不能正常工作再次。任何

的建议?


好的,我试过了,我在下面的代码行中收到了编译错误

Public Sub ConnectDB(ByRef DBName As String,ByRef ADOControl As VB6.ADODC,Optional ByRef UseDefault As Boolean = True,可选ByRef ReadOnly_Renamed As Boolean = False,可选ByRef RSLock As ADODB.LockTypeEnum = ADODB.LockTypeEnum.adLockOptimistic


编译器不喜欢vb6.adodc引用。当我升级整个项目时,这个引用没有问题。任何建议


*" =?Utf-8?B?bWlrZQ ==?="< an ******* @ discussion.microsoft.com> scripsit:< blockquote class =post_quotes>在我的vb6应用程序中,我有一套标准模块,我包含在我的所有应用程序中。但是,当我升级现有应用程序时,它会创建这些模块的副本在应用程序目录中。
问题是我无法将这些文件移动到标准位置,然后将所有应用程序指向此位置。我查看了不同的新闻组
,我找到的最接近的解决方案是使用继承。这个
解决方案适用于一次又一次地使用标准表单,但是当你有一个又一个又一次使用的标准模块时,它似乎不能很好地工作。有什么建议吗?




我会创建一个包含这些方法的类库,并从EXE项目中引用类b库。


-

Herfried K. Wagner [MVP]

< http://www.mvps.org/dotnet>

In my vb6 apps I have a set of standard modules that I include in all of my applications. However, when I upgrade an existing application it creates a copy of these modules in the application directory. The problem is that I can''t move these files to a standard location and then point all my apps to this location. I''ve looked on different newsgroups and the closest solution I have found is to use inheritance. This solution works for using a standard form over and over again, but does not seem to work well when you have standard modules that you are wanting to use over and over again. Any suggestions?

解决方案

why not put all these classes/modules in a dll and reference to that dll in
all your applications?

dominique
"mike" <an*******@discussions.microsoft.com> wrote in message
news:0A**********************************@microsof t.com...

In my vb6 apps I have a set of standard modules that I include in all of


my applications. However, when I upgrade an existing application it creates
a copy of these modules in the application directory. The problem is that I
can''t move these files to a standard location and then point all my apps to
this location. I''ve looked on different newsgroups and the closest solution
I have found is to use inheritance. This solution works for using a
standard form over and over again, but does not seem to work well when you
have standard modules that you are wanting to use over and over again. Any
suggestions?


Ok, I have tried that and I am getting a compilation error on the following line of code
Public Sub ConnectDB(ByRef DBName As String, ByRef ADOControl As VB6.ADODC, Optional ByRef UseDefault As Boolean = True, Optional ByRef ReadOnly_Renamed As Boolean = False, Optional ByRef RSLock As ADODB.LockTypeEnum = ADODB.LockTypeEnum.adLockOptimistic

The compiler doesn''t like the vb6.adodc reference. When I upgrade an entire project it doesn''t have a problem with this reference. Any suggestions


* "=?Utf-8?B?bWlrZQ==?=" <an*******@discussions.microsoft.com> scripsit:

In my vb6 apps I have a set of standard modules that I include in all
of my applications. However, when I upgrade an existing application it
creates a copy of these modules in the application directory. The
problem is that I can''t move these files to a standard location and then
point all my apps to this location. I''ve looked on different newsgroups
and the closest solution I have found is to use inheritance. This
solution works for using a standard form over and over again, but does
not seem to work well when you have standard modules that you are
wanting to use over and over again. Any suggestions?



I would create a class library that includes these methods and reference
the class library from your EXE projects.

--
Herfried K. Wagner [MVP]
<http://www.mvps.org/dotnet>


这篇关于标准包含文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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