Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Public Class WebReloader
- Dim bytesC As Integer
- Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
- WebBrowser1.Navigate(TextBox1.Text)
- End Sub
- Private Sub WebReloader_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
- AddHandler WebBrowser1.DocumentCompleted, New _
- WebBrowserDocumentCompletedEventHandler(AddressOf RecargaWeb)
- End Sub
- Private Sub RecargaWeb()
- If CheckBox1.Checked Then
- WebBrowser1.Navigate(TextBox1.Text)
- bytesC += WebBrowser1.DocumentText.Length
- Label_recargas.Update()
- Label_recargas.Text += 1
- Label_bytes_consumidos.Update()
- If Val(Label_recargas.Text) >= Val(limite_recargas.Text) And Not Val(limite_recargas.Text) = 0 Then
- CheckBox1.Checked = False
- End If
- End If
- If bytesC < 1024 Then
- Label3.Text = "Bytes consumidos"
- Label_bytes_consumidos.Text = bytesC
- End If
- If bytesC >= 1024 And bytesC < 1048576 Then ' KBytes - Menos de 1 MG
- Label3.Text = "KBytes consumidos"
- Label_bytes_consumidos.Text = bytesC / 1024
- End If
- If bytesC >= 1048576 And bytesC < 1073741824 Then ' MBytes - Menos de 1 GB
- Label3.Text = "MBytes consumidos"
- Label_bytes_consumidos.Text = bytesC / 1048576
- End If
- If bytesC >= 1073741824 Then ' GBytes
- Label3.Text = "GBytes consumidos"
- Label_bytes_consumidos.Text = bytesC / 1073741824
- End If
- End Sub
- End Class
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement