views:

197

answers:

1

Hi guys,

We stumbled on the usual friday afternoon bug...

We have a .net 2.0 winform app that uses the WebBrowser control (deployed on xp tablet edition, with latest IE 7). At some point in a page, we are hidding a div and setting a textbox value using some javascript. At that point, the operation is working (text appears in the textbox), but the complete window is now frozen. Minimizing/maximizing the window does not respond, etc: it appears that windows messages are not being processed anymore.

If I click anywhere outside of this window (taskbar, another open window), the previously frozen window is now working properly. I redo the same operation, locking occurs again. This is systematic and can be reproduced on this perticular machine anytime.

We cannot reproduce it internally using a variety of machines.

On the same machine, if i navigate to the same page and perform the same operation directly with IE 7, everything is working fine... very frustrating.

Any idea on what could cause this behavior ? what to check for ? Apparently no javascript error is thrown by the page.

thanks for any ideas or pointers

+1  A: 

The .NET 2.0 WebBrowser for Windows Forms is buggy; we've ran into so many different bugs in the implementation, including some interop errors that cause crashing AccessViolationExceptions, that we're now moving away from embedded IE and using Mozilla.

I hate to be a pessimist, but the embeddable IE control is just junk.

You might want to look into Mono.WebBrowser control. Same managed programming interface, but is implemented with the Gecko engine from Firefox and an alternate implementation with the WebKit engine from Chrome and Safari.

Another alternative is to skip the .NET 2.0 WebBrowser wrapper and use the ActiveX IE control directly via mshtml interfaces. Unfortunately, there are even a few bugs in the generated mshtml wrapper.

Bottom line: I'd recommend Mono.WebBrowser.

Judah Himango