Public Class Form1 Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click lettre1.Clear() Randomize() Dim t() As Char = {"A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z", "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z", "0", "1", "2", "3", "4", "5", "6", "7", "8", "9"} Dim x, i As Byte Dim nn As Byte Dim n() As Char = {"0", "1", "2", "3", "4", "5"} nn = Int((6 * Rnd())) lettre1.Text += n(nn) lettre1.Text = n(nn) For x = 1 To 4 i = Int((62 * Rnd())) lettre1.Text += t(i) Next WebBrowser1.Navigate("http://puu.sh/" & lettre1.Text) End Sub Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Button1.PerformClick() End Sub Private Sub lettre1_GotFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles lettre1.GotFocus Button1.Focus() End Sub Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click Clipboard.SetText("http://puu.sh/" & lettre1.Text) End Sub Private Sub WebBrowser1_DocumentCompleted(ByVal sender As Object, ByVal e As System.Windows.Forms.WebBrowserDocumentCompletedEventArgs) Handles WebBrowser1.DocumentCompleted Try If WebBrowser1.ReadyState = WebBrowserReadyState.Complete Then If WebBrowser1.Document.GetElementById("mainTitle").InnerText = "Page Web introuvable" Then Button1.PerformClick() Else End If End If Catch ex As Exception End Try End Sub Dim zoom As Integer = 100 Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click zoom += 10 Me.WebBrowser1.Document.Body.Style = "zoom:" & zoom & "%" End Sub Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click If zoom = 10 Then Else zoom -= 10 Me.WebBrowser1.Document.Body.Style = "zoom:" & zoom & "%" End If End Sub Private Sub Button5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button5.Click zoom = 100 Me.WebBrowser1.Document.Body.Style = "zoom:100%" End Sub End Class