简体   繁体   中英

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?

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

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.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM