Guest User

PassGen

a guest
May 27th, 2013
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
VB.NET 0.79 KB | None | 0 0
  1. Public Class Form1
  2.  
  3.     Dim rn As New Random
  4.  
  5.     Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
  6.         ProgressBar1.Value += 1
  7.         If ProgressBar1.Value = ProgressBar1.Maximum Then
  8.             Timer1.Stop()
  9.             ProgressBar1.Value = 100
  10.             MsgBox("Fertig.")
  11.             TextBox1.Clear()
  12.             Dim Chars() As Char = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789".ToCharArray
  13.             For i As Integer = 0 To TextBox3.Text()
  14.                 TextBox1.AppendText(Chars(rn.Next(Chars.Length)))
  15.             Next
  16.         End If
  17.     End Sub
  18.  
  19.     Private Sub Start_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Start.Click
  20.         Timer1.Start()
  21.     End Sub
  22. End Class
Advertisement
Add Comment
Please, Sign In to add comment