By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
464,369 Members | 1,218 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 464,369 IT Pros & Developers. It's quick & easy.

AxWebBrowser, NewWindow2 - modal behaviour locks entire app?

P: 1

I have created a hosted AxWebBrowser control and I handle the NewWindow2 event to open new windows in my own forms. Our application accesses a JSF (Java Server Faces) backend with some custom controls created by Oracle (specifically a date/calendar popup to select a date). These custom controls behave in a strange way, i.e. they "fade" the parent window, make the child popup modal but apparently not by using "showModalDialog". It somehow locks the parent thread and does some focus return to the popup if you click any other related window. Now, this all works fine in IE (I assume because it is multi-threaded) but in my hosted version it locks the ENTIRE winforms app, and actually the popup itself is then rendered frozen because the new form does not get any mouse click events. This appears to be the javascript locking down the entire message pump to the application.

I have tried making the windows multithreaded (i.e. call Application.Run on my new popup form within a new thread delegate) but it did not work (the only way I could see to do it is keep a static reference to the NewWindow2 event arg object and create the new form in the thread call and assign ppDisp from the static reference). This resulted in my form opening and the system handling the newWindow itself (as if you forgot to assign ppDisp).

I guess the real question is... how is IE written to be multi-threaded yet still able to assign ppDisp successfully? Has anyone ever had to make their new window handling multithreaded?


Oct 10 '06 #1
Share this question for a faster answer!
Share on Google+

Post your reply

Sign in to post your reply or Sign up for a free account.