Windows Common Controls 6.0 组件 (MSCOMCTL.OCX) 的正确来源是什么? [英] What's the proper source for Windows Common Controls 6.0 component (MSCOMCTL.OCX)?

查看:79
本文介绍了Windows Common Controls 6.0 组件 (MSCOMCTL.OCX) 的正确来源是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试编写 ActiveX 控件,并注意到我似乎无法在 Visual Basic (6.0) 中创建具有更复杂控件的 ActiveX 控件.标签,按钮和复选框等简单控件似乎可以正常工作,但是一旦我尝试添加例如我的窗体的树控件,一旦我将 ActiveX 控件嵌入到另一台计算机上的某个主机应用程序中,它就会完全保持空白.不过,它在我的开发盒上运行良好.

I'm experimenting with writing ActiveX controls and noticed that I can't seem to create an ActiveX control in Visual Basic (6.0) which features slightly more sophisticated controls. Simple controls like labels, buttons and check boxes seem to work fine, but as soon as I try to add e.g. a tree control to my form, the ActiveX control stays entirely blank as soon as I embed it into some host application on another computer. It works fine on my development box though.

在浏览 Projects->Components (Ctrl+T) 列表时,我发现 两个 库显然包含一个树形控件:

While going through the Projects->Components (Ctrl+T) list, I found two libraries which apparently contain a tree control:

  • Microsoft Windows 通用控件 5.0 (SP2)
  • Microsoft Windows 通用控件 6.0 (SP6)

只要我将这些库中的任何控件添加到我的表单中,当嵌入到另一台计算机上时,表单就会完全保持灰色.另一台计算机是 Windows XP 系统,所以我希望缺少可再发行组件不会成为问题,因为 Visual Basic 6 已经很老了.可以肯定的是,我安装了 VB6 可再发行组件,但不幸的是这并没有什么不同.

As soon as I add any of the controls from these libraries to my form, the form stays entirely gray when embedded on another computer. The other computer is a Windows XP system, so I hoped that missing redistributables wouldn't be an issue, given how old Visual Basic 6 is. To be sure, I installed the VB6 redistributables, but unfortunately that didn't make a difference.

有谁知道为什么我的 ActiveX 控件在其他计算机上会保持灰色,但在我的计算机上不会,只要我将上述库中的任何控件添加到我的表单中?FWIW 我只需要一个树控件,所以如果有其他更合适的库可用 - 这对我来说很好.

Does anybody know why my ActiveX control would stay gray on other computers, but not on mine, as soon as I add any of the controls from the above libraries to me form? FWIW I just need a tree control so if there is some other, more appropriate, library available - that's fine with me.

更新:事实证明,它有助于将 MSCOMCTL.OCX 下载到另一台计算机上的 C:WINDOWSSYSTEM32 中,然后通过 regsvr32 C:WINDOWSSYSTEM32MSCOMCTL.OCX 注册它.但是,我没有找到该文件的官方来源,并且手动运行 COM 注册对我来说看起来很麻烦.真的没有我可以使用的可再发行产品吗?

UPDATE: As it turned out, it helps to download MSCOMCTL.OCX into C:WINDOWSSYSTEM32 on the other computer and then registering it via regsvr32 C:WINDOWSSYSTEM32MSCOMCTL.OCX. However, I didn't find an official source for this file, and running the COM registration by hand looks cumbersome to me. Is there really no redistributable I could use?

推荐答案

XP及以上版本预装了VB6运行时,但您引用的Common Controls组件没有.

VB6 runtime is preinstalled on XP and above but the Common Controls component you are referencing is not.

尝试安装 Microsoft VisualBasic 6.0 Common Controls 可在客户端机器或事件上再分发更好地为您的应用程序进行设置.

Try installing Microsoft Visual Basic 6.0 Common Controls redistributable on the client machines or event better make a setup for your application.

Opps,该链接适用于不安装 OCX(如果尚未安装)的更新.我发现的唯一可再发行组件是 Windows Installer 的 合并模块.

Opps, the link is for an update that does not install the OCXs if not already present. The only redistributable I find is a merge module for Windows Installer.

这篇关于Windows Common Controls 6.0 组件 (MSCOMCTL.OCX) 的正确来源是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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