We have been updating a VB app from WebForms to work with WebView2, and doing so caused issues with our progress bar. WebView2 seems to have barely any example documentation so it has been difficult to look into solutions, and I am somewhat new to the software we are updating, so I was wondering if anyone knows what the ProgressChanged event would be for WebView2 – here is our code (I believe where it says WebView.[…] it would have been WebForms.[…].
#Region "Web Browser" ''Status bar update Private Sub WebView_ProgressChanged(sender As Object, e As WebBrowserProgressChangedEventArgs) Handles WebView.ProgressChanged If e.MaximumProgress <> 0 And e.MaximumProgress >= e.CurrentProgress Then ProgressBar1.Visible = True ProgressBar1.Value = Convert.ToInt32(100 * e.CurrentProgress / e.MaximumProgress) Else ProgressBar1.Visible = False End If End Sub ''Status bar update /end #End Region
EDIT: Regrettably I had initially accidently noted this question as “C#” rather than VB by mistake, because most of our apps are C#, and I think this is why my question was downvoted – I hope now that the question has been fixed, that someone will be able to provide an answer. Thank you!
Leave an answer