hello, I'm using the SHDocVw.WebBrowserClass. I'm trying to get the
System.Windows.Forms.Form of the explorer window out of it. how can i do
this?
thanx, amir
Amir,
>hello, I'm using the SHDocVw.WebBrowserClass. I'm trying to get the
>System.Windows.Forms.Form of the explorer window out of it. how can i do
>this?
You can't, since it's not a Form.
Mattias

Signature
Mattias Sjögren [MVP] mattias @ mvps.org
http://www.msjogren.net/dotnet/ | http://www.dotnetinterop.com
Please reply only to the newsgroup.
Amir Zicherman - 20 Dec 2004 07:25 GMT
Thanx for the response. Yeah that makes sense...
The reason i wanted to have this is to listen to the explorer window's
events. the issue is that right now, the window related events i try to
register through the SHDocVw.WebBrowserClass don't work for me. i can get
get DocumentComplete and BeforeNavigate2 to register, but i can't get any
window events like WindowSetLeft to fire.
First i have this in the constructor:
this.ExplorerAttached +=new EventHandler(this.ExplorerAttachedHandler);
Then i have this in the ExplorerAttachedHandler method:
void ExplorerAttachedHandler(object o, System.EventArgs e)
{
Explorer.WindowSetLeft += new
SHDocVw.DWebBrowserEvents2_WindowSetLeftEventHandler(Explorer_WindowMoved);
Explorer.DocumentComplete += new
SHDocVw.DWebBrowserEvents2_DocumentCompleteEventHandler(Explorer_DocumentComplete);
Explorer.BeforeNavigate2 += new
SHDocVw.DWebBrowserEvents2_BeforeNavigate2EventHandler(OnBeforeNavigate2);
}
The BeforeNavigate2 and DocumentComplete fire ok, but the WindowSetLeft does
not fire when i resize or move the explorer window around. any idea why that
is? thanx in advance, amir
"Mattias Sjögren" wrote:
> Amir,
>
[quoted text clipped - 5 lines]
>
> Mattias