Re: Setting focus on a TWebBrowser



I did think about posting mouse clicks to the browser. The problem is that the program don't know what is a "safe" spot to click. The thing viewed in the browser has buttons in it and I would not want to click one of those.

Instead I had to tackle the original problem, which was that due to focus beeing in another control (a drop down) a user scrolling the mouse would cause massive numbers of blablabla.NavigateTo("yabbadehut.htm"), which in turn caused my app to hang. I'm still not sure why it hangs but it looks as if NavigateTo is called while the previous file is beeing rendered the browser hangs.

So using an event flag, a timer and some other ugly stuff I managed to get my app not to hang without moving focus to the browser.

/Leif

.


Quantcast