webbrowser.document.body.outertext可以得到已经装载页面的BODY元素里面的所有文本内容,然后再instr查找即可

解决方案 »

  1.   

    activebar1.refresh
    再来一个
    activebar1.RecalcLayout
      

  2.   

    Private Function findInPage(Brow As WebBrowser, str As String) As Boolean
        Dim txt As Object, i As Integer, found As Boolean
        Static n As Integer
        Set txt = Brow.Document.body.createTextRange
        For i = 0 To n
            found = txt.findText(str)
            If Not found Then
                Exit For
            End If
            txt.moveStart "character", 1
            txt.moveEnd "textedit"
        Next
        If found Then
            txt.moveStart "character", -1
            txt.findText str
            txt.Select
            txt.scrollIntoView
            n = n + 1
            findInPage = True
        ElseIf n > 0 Then
            n = 0
            findInPage = findInPage(Brow, str)
        Else
            findInPage = False
        End If
        Set txt = Nothing
    End Function
      

  3.   

    不要用Type=2的Band作为SubBand,要用Type=0,DockingArea=5的Band作SubBand。见例子ColorDropDownhttp://www.datadynamics.com有了ActiveBar 2.0 SP3
    http://www.softproxy.net/perl/get.pl?id=94683