Fog Creek Software
g
Discussion Board




Microsoft WebBrowser control problem

Two questions about the WebBrowser control.

1. Is there any way to stop it from playing the "Windows Explorer / Start Navigate" sound other than having the user change the sound settings in the Control Panel? I am using the control to display status that I periodically update, and it 'clicks' every time this occurs.

2. I have a multi-window app with one hosting the WebBrowser control (in an ATL CAxWindow). I periodically regenerate the HTML page for this control and Refresh (or Navigate) to the page to update it. When this happens, if the WebBrowser control has ever been clicked in or scrolled, the window hosting the WebBrowser will come to the foreground. This is rather annoying to the user who was working in the other window...

Thanks for any suggestions.

Sean McDowell
Friday, December 19, 2003

In our VB6 application we pop up various IE windows and manipulate them. The way we get around this is by keeping track of the window handles in a collection and then using the API call BringWindowToTop to bring the appropriate windows to the front when needed.

You might consider trying this: After you refresh your form with the IE control, couldn't you just have the current form that the user is working on moved back to the front?

lReturn = BringWindowToTop(WindowHandle)

GenX'er
Friday, December 19, 2003

*  Recent Topics

*  Fog Creek Home