我设计了一个Active form,发布在本机(192.168.0.1)的虚拟目录active中,在本机测试没有问题,可以显示。然后我在别的机器(192.168.0.2)上再试试,将192.168.0.1加入可信站点,输入http://192.168.0.1/active/DDMyACProj1.htm,回车,却显示不出,只有一个大空框和一个占位符。我察看缓存,ocx文件已经下载过来,用delphi工具观察也已经安装,但就是无法显示。
测试网页DDMyACProj1.htm内容是:
<HTML>
<H1> Delphi 6 ActiveX Test Page </H1><p>
You should see your Delphi 6 forms or controls embedded in the form below.
<HR><center><P>
<OBJECT
  classid="clsid:0D29D1B9-9F0C-469A-9816-6C971BB1CAE1"
  codebase="http://192.168.0.1/active/DDMyACProj1.ocx#version=1,0,2,0"
  width=337
  height=208
  align=center
  hspace=0
  vspace=0
>
</OBJECT>
</HTML>

解决方案 »

  1.   

    应该不是数字签名的原因,因为可信站点的级别是最低的,ACtive允许下载且运行
      

  2.   

    肯定是其他机器没有,还有就是没有提供自动下载。
    codeBase = "路径"
      

  3.   

    例如:
    <OBJECT classid=clsid:D0BEE905-65D9-11D7-BF64-0000E8E49768 
      codeBase=../ocx/conditionocx.ocx#vertion=1,0,0,0 height="100%" id=Condition1 
    name=condition1 width="100%" VIEWASTEXT>
    <PARAM NAME="Visible" VALUE="0">
    <PARAM NAME="AutoScroll" VALUE="0">
    <PARAM NAME="AutoSize" VALUE="0">
    <PARAM NAME="AxBorderStyle" VALUE="1">
    <PARAM NAME="Caption" VALUE="条件生成器">
    <PARAM NAME="Color" VALUE="12632256">
    <PARAM NAME="Font" VALUE="宋体">
    <PARAM NAME="KeyPreview" VALUE="0">
    <PARAM NAME="PixelsPerInch" VALUE="96">
    <PARAM NAME="PrintScale" VALUE="1">
    <PARAM NAME="Scaled" VALUE="-1">
    <PARAM NAME="DropTarget" VALUE="0">
    <PARAM NAME="HelpFile" VALUE="">
    <PARAM NAME="DoubleBuffered" VALUE="0">
    <PARAM NAME="Enabled" VALUE="-1">
    <PARAM NAME="Cursor" VALUE="0">
    </OBJECT>