的CommonDialog [英] CommonDialog

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

问题描述

嘿,


我正在使用CommonDialog对象加载一个对话框,允许

用户选择他们想要上传的文件。这个解决方案完美地适用于安装了一些Visual Studio应用程序的计算机,但是在没有任何安装程序的计算机上,它不会工作,因为它不是

已注册所需文件。


我正在使用的代码:


ComDlg = new ActiveXObject( MSComDlg.CommonDialog);


ComDlg.Filter ="所有文件(*。*)| *。*" ;;

ComDlg。 FilterIndex = 1;

ComDlg.Flags = 0x200 | 0x1000 | 0x80000;

ComDlg.MaxFileSize = 512;


ComDlg.ShowOpen();

有没有人有办法我仍然可以使用没有comdlg32.dll正确注册的
计算机上的CommonDialog对象?我没有将comdlg32.dll文件放在用户计算机上的问题,但是如果我可以注册它/如何使用它而不注册它?


任何帮助将不胜感激,

Yaniv

Hey,

I''m using the CommonDialog object to load a dialog which allows the
user to select the files they want to upload. This solution works
perfectly on computers that have some Visual Studio applications
installed, but on those without any, it won''t work since it doesn''t
have the required file registered.

The code I''m currently using:

ComDlg = new ActiveXObject("MSComDlg.CommonDialog");

ComDlg.Filter = "All Files(*.*)|*.*";
ComDlg.FilterIndex = 1;
ComDlg.Flags = 0x200 | 0x1000 | 0x80000;
ComDlg.MaxFileSize = 512;

ComDlg.ShowOpen();
Does anyone have a way I can still use the CommonDialog object on
computers that dont have comdlg32.dll registered correctly? I have no
problem putting the comdlg32.dll file on the users computer, but how
can I register it/use it without registering it?

Any help would be greatly appreciated,
Yaniv

推荐答案

ya ********* @ gmail.com 写道:
ya*********@gmail.com wrote:
有没有人有办法在没有正确注册comdlg32.dll的计算机上使用CommonDialog对象?我没有将comdlg32.dll文件放在用户计算机上的问题,但是如何在不注册的情况下注册/使用它?
Does anyone have a way I can still use the CommonDialog object on
computers that dont have comdlg32.dll registered correctly? I have no
problem putting the comdlg32.dll file on the users computer, but how
can I register it/use it without registering it?




你不能。这个控件有支持,或者没有支持。

之间没有。既然你已经正确地确定了问题

与脚本无关,你为什么要坚持发布到这个

新闻组处理_J(ava)脚本/ ECMAScript_ ?

PointedEars



You cannot. There is either support for this control or there is not.
There is no between. And since you have correctly identified the problem
to be not script-related, why are you insisting on posting in to this
newsgroup dealing with _J(ava)Script/ECMAScript_?
PointedEars


ya * ********@gmail.com 写道:
ya*********@gmail.com wrote:
我没有把comdlg32.dll文件放在用户计算机上的问题,但是我可以如何注册/使用它而无需注册?
I have no
problem putting the comdlg32.dll file on the users computer, but how
can I register it/use it without registering it?




将comdlg32.dll放到用户''上你当然应该有问题。 />
计算机,因为你没有许可证。您可能只会重新分发那些Microsoft列为可再发行的文件,并且它们非常明确地表示comdlg32.dll不可再发行。


请参阅 http://support.microsoft.com/kb/q216368/




Thomas''PointedEars''Lahn写道:

Thomas ''PointedEars'' Lahn wrote:
你做不到。有这种控制的支持或没有。
之间没有。既然你已经正确地确定了问题与脚本无关,你为什么要坚持发布到这个处理_J(ava)Script / ECMAScript _的新闻组?
You cannot. There is either support for this control or there is not.
There is no between. And since you have correctly identified the problem
to be not script-related, why are you insisting on posting in to this
newsgroup dealing with _J(ava)Script/ECMAScript_?



也许是因为JScript被用作访问系统资源的层?


要OP:不要注意< Thomas''PointedEars''拉恩> - 他是想要成为当地怪异男人的b $ b,但他真的并不诡异。只是

说他grrrh大声说,他会逃跑。 :-)


假设您拥有局域网的所有权利:


首先,您需要在每个上安装免费的Microsoft .Net Framework软件包br $>
计算机。


补丁.Net Framework 1.1补丁(如果需要)。


开始使用。 dll库首先需要在GAC注册

(全球大会现金)。到目前为止我找到的最简单的方法是使用

Windows资源管理器:

1.运行两个Explorer实例。

2. In第一个资源管理器导航到您的dll所在的文件夹

位于

3.在第二个资源管理器中导航到文件夹< Windows> \assembly

4.将dll从第一个Explorer窗口拖放到第二个窗口。

5.现在应该可以工作了。


注意:它必须是Windows资源管理器,而不是文件夹窗口,否则

鸟不会飞。



Maybe because JScript is used as a tier to access system resources?

To OP: do not pay attention to <Thomas ''PointedEars'' Lahn> - he''s
trying to be local spooky man, but he''s not spooky at all really. Just
say him "grrrh" out loud and he will run away. :-)

Presuming you have all rights in your LAN:

First you have to install free Microsoft .Net Framework package on each
computer.

Patch .Net Framework with 1.1 patch (if needed).

To start using a .dll library first you need to register it in GAC
(Global Assembly Cash). The simplest way I''ve found so far is using
Windows Explorer:
1. Run two instances of Explorer.
2. In the first Explorer navigate to the folder where your dll is
located
3. In the second Explorer navigate to the folder <Windows>\assembly
4. Drag and drop dll from the first Explorer window to the second one.
5. It should work now.

NB: it must be Windows Explorer, not a folder window, otherwise the
bird will not fly.


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

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