使用open-webkit-sharp实现进度条

时间:2013-06-26 02:21:58

标签: vb.net visual-studio-2010 open-webkit-sharp

使用open-webkit-sharp时是否可以实现进度条?我尝试使用普通的WebBrowser控件执行此操作,但这是不可能的。没有e.CurrentProgress和e.MaximumProgress。还有另一种方法吗?

1 个答案:

答案 0 :(得分:4)

看看这是否有帮助

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

来源:codeproject