mengl520 发表于 2011-9-12 23:49

IE内核当前已经打开网页地址标题和个数

Option Explicit
Private Sub Form_Load()
    '需要引用Microsoft Internet Controls对象
    Dim WebCount As SHDocVw.ShellWindows
    Dim tmpI As Long, tmpWeb As WebBrowser
    Set WebCount = New SHDocVw.ShellWindows
    MsgBox "已经打开" & WebCount.Count & "个网页"
    For tmpI = 0 To WebCount.Count - 1
      Set tmpWeb = WebCount.Item(tmpI)
      Debug.Print tmpWeb.LocationURL
      Debug.Print tmpWeb.LocationName
    Next
    Set tmpWeb = Nothing
End Sub

xxhaishixx 发表于 2012-6-26 01:39

强力代码,谢谢分享
页: [1]
查看完整版本: IE内核当前已经打开网页地址标题和个数