Implementing a progress bar with open-webkit-sharp

737 Views Asked by At

Is it possible to implement a progress bar when using open-webkit-sharp? I tried doing it the way you would do it with the normal WebBrowser control, but it's not possible. There is no e.CurrentProgress and e.MaximumProgress. Is there another way of doing this?

1

There are 1 best solutions below

0
suraj jain On

See if this helps

Private Sub WebKitBrowser1_Navigating(ByVal sender As System.Object, ByVal e As System.Windows.Forms.WebBrowserNavigatingEventArgs) Handles WebKitBrowser1.Navigating
    ProgressBar1.Visible = True
    With ProgressBar1
        .Minimum = 0
        .Maximum = 50
        .Step = 3
    End With
    For index As Integer = 0 To 50 Step 5
        ProgressBar1.Value = index
        System.Threading.Thread.Sleep(38)
    Next
     Label2.Text = "loading"
End Sub

Private Sub WebKitBrowser1_DocumentCompleted(ByVal sender As System.Object, ByVal e As System.Windows.Forms.WebBrowserDocumentCompletedEventArgs) Handles WebKitBrowser1.DocumentCompleted
    ProgressBar1.Visible = False
    Label2.Text = "Done" 
   End Sub

Source : codeproject