描述:
我写了个Activex控件,后缀是exe的,在这个控件中有system语句,该语句是打开当地的另一个程序(.exe)。我能否把该控件和这个当地程序一起打包(.cab),通过IE下载呢?在这个包中就有两个.exe了,其中一个是Activex控件,当IE下载后 ,如何知道其中哪一个是Activex控件而另一个是被该Activex控件调用的程序(.exe).然后在IE中显示呢?? 谢谢各位先!!
解决方案1:
为什么要把控件做成exe ,做成ocx嘛
然后参照下面的例子打包成cab就ok.
; INF file for LG.ocx
[version]
; version signature (same for both NT and Win95) do not remove
signature="$CHICAGO$"
AdvancedINF=2.0
[Add.Code]
FinalActivex.ocx=FinalActivex.ocx
; These are the necessary supporting DLLs for MFC 4.2 ActiveX Controls
mydll.dll=mydll.dll
; thiscab is a keyword which, in this case, means that Spindial.ocx
; can be found in the same .cab file as this .inf file
; file-win32-x86 is an x86 platform specific identifier
; See the ActiveX SDK - ActiveX Controls - Internet Component Download -
; Packaging component code for automatic download
[FinalActivex.ocx]
file-win32-x86=thiscab
; *** add your controls CLSID here ***
clsid={27BF10E1-2F95-4C72-B11C-94200A9CCAE1}
; Add your ocx's file version here.
FileVersion=1,0,0,002
RegisterServer=yes
; needed DLL
[mydll.dll]
file-win32-x86=thiscab
DestDir=11
FileVersion=1,0,0,002
RegisterServer=yes
; end of INF file
是一样的撒,你想想,如果你的ocx要调用记事本不也是一样的道理,把exe放在系统目录下,ocx调用的时候自己会找得到,^_^
解决方案3: inf文件中设置一下.
http://blog.csdn.net/gjd111686/archive/2004/07/07/36221.aspx
您可能想查找下面的文章:
- activex添加的属性在ie中为何传递不成功
- 怎么用ActiveX开发IE插件
- 使用微软提供的将word嵌入ie的activeX控件在保存时出错
- =====>急问,ActiveX在IE下载过程是走的tcp什么端口?是80吗?
- IE中嵌入控件的问题,关于FromIDispatch,超郁闷,帮帮我吧。
- ActiveX控件在IE里能避免informationbar出现么?
- 能不能将一个ie的dll插件转换成activeX组件做到自动下载并注册
- 在IE中嵌入控件,退出IE时错误,wincorecpp,line365,不明白,请指点
- ActiveX控件在IE中无法显示???
- 设置Activex控件的显示大小