all groups > dotnet interop > december 2006 >
You're in the

dotnet interop

group:

AxShDocVw.WebBrowser


AxShDocVw.WebBrowser DariusB
12/19/2006 11:32:03 AM
dotnet interop:
I was looking over:
http://www.codeproject.com/cs/media/IECapture.asp
I want to use AxShDocVw instead of ShDocVw (si i could use OleDraw method, which needs an activex control supplied).The problem is that i don't know how to get the open browser.
if i use:

foreach (SHDocVw.WebBrowser ie in shellWindows)
{
filename = Path.GetFileNameWithoutExtension(ie.FullName).ToLower();
if (filename.Equals("iexplore"))
{
m_browser = ie;
break;
}
}
if (m_browser == null)
{
MessageBox.Show("No Browser Open");
return;
}

how can i cast m_browser, which is a ShDocVw.WebBrowser to AxShDocVw.WebBrowser ?

Thank you again, and i hope i managed to make myself clear...
Im a begginer, so please tell me if my question makes no sense.
---
Re: AxShDocVw.WebBrowser catharticmomentusenet NO[at]SPAM yahoo.co.uk
12/21/2006 1:04:51 AM
Sorry I can't offer an exact solution, but I'd suspect casting would be
impossible, since these are two different objects and neither inherits
from the other.

Instead, you should investigate altering your code to create an
AxShDocVw.WebBrowser initially.
AddThis Social Bookmark Button