February 10, 2012
Hot Topics:
RSS RSS feed

Creating a Web Browser

  • November 19, 2002
  • 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.




Comment and Contribute

 


(Maximum characters: 1200). You have characters left.

 

 


Networking Solutions
Sitemap | Contact Us