Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Is there a way to restart WebBrowser object or MSHTML browser in a frm

Status
Not open for further replies.

Logmaster

Technical User
Jan 2, 2006
31
US
Hi,

I am creating an application with mini-browser using the WebBrowser object. Under options, I would like to allow the users to change the User Agent settings and apply the changes to the registry.

The problem is that the chances to the user agent settings in the registry take effect only after I restart the application (and basically restart the webbrowser object).

I have two questions:
1. Is there a way to have the browser object read the new settings without app restart? (I.e. Dispose and then re-create the object? I haven't managed to recreate it successfully so I don't know if it works)
(I don't know if it's possible to inject headers using one of the two components mentioned above)

2. Is there a way to inject the User Agent string to the header?

Any advice will be greatly appreciated.

Thanks,
Joe
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top