I'm searching if it possible to check if some website for eg google.com is opened in IE. I have already this code but it was only for checking if IE is open and to close it, But it's not working.
Dim processCollection() As Process
processCollection = Process.GetProcessesByName("iexplore.exe")
If processCollection.Count > 0 Then
For Each process As Process In processCollection
process.Dispose()
Next
Return False
Else
MessageBox.Show("Ie is now close", "IE")
End If
Thanks for helping
Follow these steps
Function InternetExplorerRunning()
For Each ie As InternetExplorer In New ShellWindows()
Dim OpenWebsite As String
OpenWebsite = ie
If OpenWebsite = "google.com" Then
MsgBox("Google is open")
End If
Next
End Function
This code is in a timer.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.