473,657 Members | 2,505 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

A WebBrowser control challenge for you pros...

Logan1337
38 New Member
Ok folks, I have a challenge for you. It's simply stated, but not so simply done:

Show me how to tell when a WebBrowser control:

a) starts to load a new page, and
b) finishes loading the current page

I have spent hours and hours and hours on this and have exhausted every possible solution and still have not found a solution that works for all cases.

Some tricks I have tried:
-counting the number of Navigating/Navigated events to DocumentComplet ed events
-storing Navigated urls in a list and removing them in DocumentComplet ed
-checking whether the browser.Url property equals the Navigated/Completed e.Url property
-even so far as checking the status string for "Done".

All of these solutions have problems. I swear I'm beginning to think it can't even be done. What a horrible design Microsoft did on this control, and what a simple thing to want to do.

It would be as easy as this if Microsoft had allowed for it: determine if a Navigating event wants to change the browser.Url property, or if it is simply loading a sub-document like a script or something. But so far as I can tell there's no way to determine that, either.

I can't give up! This is crucial!

Logan
Jul 3 '07 #1
1 927
Logan1337
38 New Member
Eureka!

If anyone else has been pulling their hair out over this, I suggest taking a look at mehrcpp's C# WebBrowser wrapper control CsExWB at The Code Project.
Jul 3 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

5
7547
by: Noozer | last post by:
I've got a WebBrowser control (AxBrowse - VCMAXB.DLL) and I'm having a few difficulties with it. Just looking for a few pointers, not whole solutions here. I've tried looking at the MSDN help files with little success. - When a new window is trying to pop up, how do I determine the target URL? How can I get the page to open in the current browser control? - When printing from the webbrowser control is there a way to ensure it prints...
1
4426
by: Mike Z... | last post by:
Hi! I have a winform with embedded webbrowser control. When a user navigates to a page that has a link or a button that calls windows.close() javascript, the control closes yet the form does not. Since the control does not expose the onQuit() event, I need to capture the message and close my winform. I found the following Microsoft article that explains on how to do it in C++. I recently switched from Cold Fusion and have a heck of a time...
0
3459
by: Jim Hubbard | last post by:
How would I implement the IDispatch interface to handle the following in VB.Net <BEGIN> Controlling Download and Execution The WebBrowser Control gives you control over what it downloads, displays, and executes. To gain this control, you need to implement your host's IDispatch so it handles DISPID_AMBIENT_DLCONTROL. When the WebBrowser Control is instantiated, it will call your IDispatch::Invoke with this ID. Set pvarResult to a...
0
1168
by: DavidB | last post by:
The 2.0 WebBrowser control is a wonderful thing, but the cross-frame limitation is something I could do without. Any practical suggestions on how to get around it? 1. Set the Domain property -- sorry, that doesn't work for me. 2. Q196340 -- well maybe, but getting the unmanaged object back as a managed HtmlDocument is a challenge. 3. Manipulate security settings -- possibly the best answer, but how? All suggestions much appreciated.
12
6357
by: Alex Clark | last post by:
Greetings, (.NET 2.0, WinXP Pro/Server 2003, IE6 with latest service packs). I've decided to take advantage of the layout characteristics of HTML documents to simplify my printing tasks, but of course it's thrown up a whole host of new issues... I'm generating a multi page printable document in HTML from my app, and displaying it in a WebBrowser control. I've looked into using some CSS
8
3400
by: Prosperz | last post by:
Hi, I would like to make thumbnails of web page by capture content of a WebBrowser. By example, capture http://www.google.com. I used WebBrowser control with Framework 2.0. I try this : *************************************************
19
1656
by: octangle | last post by:
This code is attempting to find records that have a RegJrnID that does not occur more than one time in the table. The reason that I want to find records with non-duplicated RegJrnID values is to create "reversal" records for these such that the reversal record has identical values for every column except the TaxableAmount which will contain a negative amount. (see: example data below). /* Set up */
11
2817
by: Anil Gupte | last post by:
....and how do I insert one into my form? I used in VB 6.0 last, but cannot figure out where it is in .Net Thanx, -- Anil Gupte www.keeninc.net www.icinema.com
0
2283
by: smithse | last post by:
Hello All, This is my very first posting on bytes!! Here's my "challenge": I have a winforms app (vb.net - 2008) that has a form with the webbrowser control (ie) on it. The page which I am building on the fly (by creating the html and setting the .documenttext) has a frame that sources content from the internet. I am running this on a pc, which is NOT a part of the domain. I can browse the internet fine, when running internet...
0
8392
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8825
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8503
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8605
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6163
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5632
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4302
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2726
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1953
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.