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