ONJava.com -- The Independent Source for Enterprise Java
oreilly.comSafari Books Online.Conferences.


AddThis Social Bookmark Button
  Putting a Browser into Your Windows Application
Subject:   Modifications to this example
Date:   2005-06-28 12:11:04
From:   rlramirez
FWIW, I found that I had to modify these two event handlers:

private void webBrowser1_ProgressChanged(object sender, WebBrowserProgressChangedEventArgs e)
progressBar1.Value = (int)((e.CurrentProgress / e.MaximumProgress)*100); /// Multiply this ratio by 100 for full scaling


private void webBrowser1_DocumentCompleted(object sender, WebBrowserDocumentCompletedEventArgs e)
progressBar1.Value = 0; /// Reset the progress bar