Ciao e buon lavorocodice:Private Sub WebBrowser1_ProgressChanged(ByVal sender As Object, ByVal e As System.Windows.Forms.WebBrowserProgressChangedEventArgs) Handles WebBrowser1.ProgressChanged 'Creiamo un handle sul cambiamento di progresso del webbrowser Dim tc As ToolStripContainer = New ToolStripContainer With tc .Visible = True .Enabled = True End With Dim tp As ToolStripProgressBar = New ToolStripProgressBar With tp .Name = "tp" .Visible = True .Enabled = True .ForeColor = Color.Azure End With Dim p, d, t As Integer d = e.CurrentProgress 'Progresso corrente del webbrowser t = e.MaximumProgress 'Progresso massimo del webbrowser If d <= 0 Then 'Se il progresso corrente è 0, allora il webbrowser ha finito di caricare la pagina tp.Value = 0 tp.Visible = False Else tp.Value = Math.Min(tp.Maximum, Convert.ToInt32(Math.Floor(tp.Maximum * (d / t)))) 'Altrimenti, impostiamo il valore End If End Sub![]()

Rispondi quotando