5

Some answers seem to suggest that I should use SHDocVw.InternetExplorerMedium for internet explorer automation.

What's the difference between internetexplorer medium and internet explorer?

I tried to run this code and I got object disconnect exception

            ias.IntExpMed = New SHDocVw.InternetExplorerMedium
            ias.IntExpMed.Navigate("http://wikipedia.com")
            waitTing(1)
            ias.IntExpMed.Navigate("http://google.com")

Actually if I step through the program, the object is disconnected right after

            ias.IntExpMed.Navigate("http://wikipedia.com")
user4951
  • 32,206
  • 53
  • 172
  • 282
  • `SHDocVw.InternetExplorerMedium` is to create an instance of explorer in a medium level; security... Versions of IE 8 and on was changed. When you create this object it makes a call to `CoCreateInstance` which is a `Ole API` call (CreateObject) in vb6 and later. In vb.net this changed with the WebBrowserControl. The nice thing about `SHDocView.InternetExplorer` is it's less overhead than the control itself. I'm sure not using the medium instance works fine? If you run it against IE8 I bet the exception isn't thrown. Also nice question! – Trevor Feb 24 '16 at 01:54

0 Answers0