in my windows application i have WebBrowser control after clicking on some links popup window is open in IE i want to access URL of that Pop-up window.
i tried NewWindow event of browser control but it gives me object of parent window as sender and event.
i read about COM component web browser control which have same NewWindow event which gives me URL of popup window.How to use this COM component instade of .NET control?
i will suggest that don’t go with COM component it have some disadvantages like Memory management,exception handling and DLL Hell problem.
to get URL of popup you can cast the WebBrowser.ActiveXInstance to a SHDocVx.WebBrowser object, then handle its NewWindow3 event to retrieve the URL of the popup window.
Algo.-
on page load cast WebBrowser to SHDocVx.WebBrowser.
cancle NewWindow event of .NET control.
and write code in NewWindow3 event.