nomad
nomad

Reputation: 1778

How can I open an external browser window and refresh it inside a VB.net application?

We have an existing VB.net application. Upon an event, we need to open a browser window. I'm able to open the browser window like this:

System.Diagnostics.Process.Start("http://s3web01/suggestions?item=" + strItem + "&co=" + strOrder)

Upon another event, we need to refresh the browser window with different parameters for strItem and strOrder.

If I call the same code above, it opens a new tab in the browser window. Is there any way to refresh the same browser window that was previously opened?

Upvotes: 2

Views: 2309

Answers (1)

Sam Axe
Sam Axe

Reputation: 33738

Add a reference to the following COM libraries: Microsoft Internet Controls (namespace ShDocVw), and Microsoft HTML Object Library (namespace mshtml).

Then you can create a new IE instance:

Dim IE As ShDocVw.InternetExplorer = New ShDocVw.InternetExplorer

and control it like so: IE.Navigate("http://blah.com")

refresh it like so: IE.Refresh

etc

Upvotes: 1

Related Questions