Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / Interop / December 2004

Tip: Looking for answers? Try searching our database.

getting the Form of WebBrowserClass

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Amir Zicherman - 18 Dec 2004 08:31 GMT
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
Mattias Sj?gren - 19 Dec 2004 22:49 GMT
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

Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.