471,123 Members | 914 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,123 software developers and data experts.

AxWebBrowser, NewWindow2 - modal behaviour locks entire app?


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
0 1777

Post your reply

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

Similar topics

1 post views Thread by Zri Man | last post: by
reply views Thread by Pocholo | last post: by
3 posts views Thread by Earl Teigrob | last post: by
2 posts views Thread by Mike | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.