Solved

Web Browser control - prevent navigation until complete

Posted on 2006-11-12
1
173 Views
Last Modified: 2012-08-13
I have a VB6 app that contains an instance of the Web Browser Control which works fine. However, when a user navigates to some URLs, it takes a few seconds for the target web page to be displayed. During that time, the WBC still shows the current web page, and, if the user clicks on a second link on the current webpage, the WBC (apparently) quits trying to navigate to the first-clicked-link's web page, and, instead, navigates to the second-clicked-link's web page.

I am using WBC's Document_Complete() event to trigger business logic in my VB6 application, and when this "quit navigating to the first-clicked-link, and navigate to the second-clicked-link" happens, it causes undesirable results.

Is there a way to do this:
Immediately after the user clicks on a link on the current webpage, disable the ability for the user to click on another link on the current webpage until the browser has completely processed that click (ie, the target web page is completely displayed).

0
Comment
Question by:lee88
1 Comment
 
LVL 10

Accepted Solution

by:
Kinger247 earned 500 total points
ID: 17925169
Yes, put the webBrowser control on a picturebox, then whilst your waiting for your page to load, disable the picturebox.
When its loaded ok, re-enable it !
0

Featured Post

Optimizing Cloud Backup for Low Bandwidth

With cloud storage prices going down a growing number of SMBs start to use it for backup storage. Unfortunately, business data volume rarely fits the average Internet speed. This article provides an overview of main Internet speed challenges and reveals backup best practices.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question