【问题标题】:Geckofx Handle Document completGeckofx 处理文档完成
【发布时间】:2015-07-23 07:38:07
【问题描述】:

我需要在 Geckofx 33 网络浏览器中完成文档处理 壁虎 isbusy 功能不起作用 StatusText 也是

<i>

web.navigate("http://google.com")

msgbox(web.isbusy) ' this return False '

</i>

【问题讨论】:

    标签: .net document gecko


    【解决方案1】:

    如果 'web' 是你的 geckowebbrowser,那么就这样做:

    web.DocumentCompleted += web_DocumentCompleted;
    
    
      void web_DocumentCompleted(object sender, GeckoDocumentCompletedEventArgs e)
            {
                 //do stuff here
            }
    

    另外,不要检查“isbusy”,而是尝试为“web.navigating”使用类似的事件处理程序。

    【讨论】:

      【解决方案2】:

      IsBusy 不是在您使用 Navigate 之后立即成为 True。 在我的代码中,我等待一段时间(1 秒),然后创建循环:

       Private Sub wait(ByVal interval As Integer)
          Dim sw As New Stopwatch
          sw.Start()
          Do While sw.ElapsedMilliseconds < interval * 1000
              Application.DoEvents()
              If IBW.CancellationPending = True Then Exit Do
          Loop
          sw.Stop()
      End Sub
      
              Web.Navigate("http://google.com")
              'Now wait for 1 second before checking IsBusy
              wait(1) : Do While IWeb.IsBusy = True : Application.DoEvents() : Loop
      

      【讨论】:

        猜你喜欢
        • 2012-01-30
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2017-06-18
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2018-05-03
        相关资源
        最近更新 更多