Solved

Web Browser control - prevent navigation until complete

Posted on 2006-11-12
1
171 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
Comment Utility
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

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

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…
The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

744 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now