dcsimg
September 26, 2020
Hot Topics:

Creating a Web Browser

  • By Karl Moore
  • Send Email »
  • More Articles »

If you fancy adding a Progress Bar to indicate how fast your Web page commands are moving along, you're in luck the WebBrowser control has an event designed specially for this purpose.

To use, you first need to add a Progress Bar to your application. This control ships with Visual Basic and can be added to your project by clicking 'Projects', 'Components' and selecting 'Microsoft Windows Common Controls 6.0'.

Here's a piece of sample code that uses the WebBrowser ProgressChange event to alter a simple Progress Bar:

Private Sub WebBrowser1_ProgressChange(ByVal _
Progress As Long, ByVal ProgressMax As Long)

On Error Resume Next
ProgressBar1.Max = ProgressMax
ProgressBar1.Value = Progress
ProgressBar1.Refresh

End Sub

After inserting this code, try visiting a Web site or clicking a link then monitor the progress visually.





Page 5 of 8



This article was originally published on November 20, 2002

Enterprise Development Update

Don't miss an article. Subscribe to our newsletter below.


Thanks for your registration, follow us on our social networks to keep up-to-date