Javascript resizing with window.open and WebBrowser control
Posted
by Raj
on Stack Overflow
See other posts from Stack Overflow
or by Raj
Published on 2010-04-29T13:22:33Z
Indexed on
2010/04/29
13:27 UTC
Read the original article
Hit count: 361
I'm using WPF WebBrowser control and handling NewWindow3 events using following code:
IServiceProvider serviceProvider = (IServiceProvider)webBrowser.Document;
Guid serviceGuid = SID_SWebBrowserApp;
Guid iid = typeof(SHDocVw.WebBrowser).GUID;
SHDocVw.WebBrowser wb = (SHDocVw.WebBrowser)serviceProvider.QueryService(ref serviceGuid, ref iid);
wb.NewWindow3 += new SHDocVw.DWebBrowserEvents2_NewWindow3EventHandler(wb_NewWindow3);
How to handle javascript resizing when navigating using window.open, something like this:
window.open('Sample.htm',null,'height=200,width=400,status=yes,toolbar=no,menubar=no,location=no');
Is there anyway to get height and width requested by caller in NewWindow3 event handler?
© Stack Overflow or respective owner