用户在浏览一个网页,当然可以是除了IE以外其他的浏览器我怎么能获得该网页的地址和网页源码呢??

解决方案 »

  1.   

    Private Sub Command1_Click()
      If Text1.Text <> "" Then
         WebBrowser1.Navigate2 Text1.Text
         WebBrowser1.Visible = True
         Text2.Visible = False
      End If
    End SubPrivate Sub Command2_Click()
      Text2.Visible = True
      Text2.Text = Inet1.OpenURL(Text1.Text)
      WebBrowser1.Visible = False
    End SubPrivate Sub Command3_Click()
      End
    End Sub
      

  2.   

    Private Sub Command2_Click()Inet1.CancelIf Len(Inet1.OpenURL("http://localhost/xml\tt.htm")) <> 0 Then    MsgBox "已经连接"    Text2.Text = Inet1.OpenURL("http://localhost/xml\tt.htm")    If Inet1.StillExecuting Then       DoEvents    End If    '保存到文件    Open App.Path & "\index.htm" For Output As #1        Print #1, Text2.Text    Close #1Else    MsgBox "没有连接"End IfEnd Sub.
      

  3.   

    online(龙卷风V3.0--笑傲江湖) 完全可以
      

  4.   

    引用shdocvw.dll和mshtml.dllDim SWs As New SHDocVw.shellWindows
    Dim IE As SHDocVw.InternetExplorer Private Sub Form_Load()
    dim Doc
    List1.clear
    List2.Cleartext1.text=sws.countfor each ie in sws
       list1.additem,ie,locationname
       set doc=ie.document
       if typeofdoc is htmldocument then
         list2.additem doc.title
       end if
    next
    end sub打字太累了所以后来就不区分大小写了可能打字还有错太累了,总之一句话用这2个控件解决
    这段代码不是我产的,但是已经不知道作者了,感谢他吧
      

  5.   

    呵呵,现在人的理解能力,真是楼主好惨,应该像我这样来问:
    http://community.csdn.net/Expert/topic/3607/3607031.xml?temp=.6927149
      

  6.   

    打开VB,在工程中引用Microsoft internet controls:Private Sub Command1_Click()
        Dim IEList As New ShellWindows
        Dim browser    
        On Error Resume Next
        
        '遍历当前地浏览器窗口
        For Each browser In IEList    Next
    End Sub
      

  7.   

    又来了不是!还是俺的问题清闲、直接:
    如何获得MyIE2或腾讯TE打开的当前网页的源码及网址(网址不知)?