Dim oShellApp, oShellAppWindows, oWin
Dim url As String
oShellApp = CreateObject("Shell.Application")
oShellAppWindows = oShellApp.Windows
For Each oWin In oShellAppWindows
TextBox3.Text = oWin.Document.GetType.Name
If oWin.Document.GetType.Name = "HTMLDocumentClass" And _
InStr(1, oWin.LocationName.ToString, "IDC运营支撑平台-流程管理模块", vbTextCompare) > 0 Then
url = oWin.LocationURL
End If
Next
这段是比对网页名称,你可以尝试改下,应该类似
存在多个窗体需要传递参数用来区分!
用GetWindowThreadProcessIDea、GetWindowText就很方便了