其实完整是这样的,我有一个 index.htm ,内有一个 iframe src = debug.htm debug.htm  用一个 js 调用 调用了一个 VB 的 ActiveX 控件(显示一个VB窗体),我想问一下这个 VB 窗体如何对 debug.htm 发出刷新命令?注意是对 debug.htm ,而不是 index.htm
请大家指教

解决方案 »

  1.   

    加载时给index中增加一个可以刷新debug的按钮或js链接,然后可以用vb去点击这个按钮或js链接至于有没有直接刷新iframe的功能,暂时还没想到。
      

  2.   

    试一试Dim WithEvents ieView As InternetExplorer
    Private Sub Command1_Click()
    ieView.Refresh
    End SubPrivate Sub Form_Load()
    Set ieView = NothingOn Error Resume Next '设置错误陷阱
    Set ieView = GetObject("", "InternetExplorer.Application")
    ieView.Navigate vUrl 'vUrl为debug.htm 完整的URL
    End Sub
      

  3.   

    类型不匹配 ,Automation 错误
      

  4.   

    就是那个 microsoft Internet controls 塞
      

  5.   

    我把该去掉的都去掉了,结果只剩下,而且我还是创建的标准 EXE 来调试的;Dim WithEvents ieView As InternetExplorerPrivate Sub Command1_Click()
       Set ieView = GetObject("", "InternetExplorer.Application")
    End Sub就这样就提示 Set ieView = GetObject("", "InternetExplorer.Application") 类型不匹配
    为什么啊,我已经引用了 microsoft Internet controls。另外,如果不定义 ieView ,则 Set ieView = GetObject("", "InternetExplorer.Application") 可顺利运行。
      

  6.   

    编译后 也提示 Automation 错误