Solved

Web Browser control - prevent navigation until complete

Posted on 2006-11-12
1
178 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Revamp Your Training Process

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action.

Question has a verified solution.

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

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…
Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
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…
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…
Suggested Courses
Course of the Month6 days, 12 hours left to enroll

623 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