Fake Key Generator ! [Used for Niches] 04-08-2013, 04:22 AM
#1
Today I will teach you how to create a quick key generator!
1. Drag a text box and a button to the form.
2. Double click Button1 to
open the code viewer.
3. Replace all the code with
this:
4. Try to make your program
look as appealing as
possible. Add pictures of
your niche, or find a
VB.NET theme. Your goal
is to convince your viewer.
1. Drag a text box and a button to the form.
2. Double click Button1 to
open the code viewer.
3. Replace all the code with
this:
Code:
Public Class Form1
Dim objRandom As New System.Random( _
CType(System.DateTime.Now.Ticks Mod System.Int32.MaxValue, Integer))
Public Function GetRandomNumber( _
Optional ByVal Low As Integer = 1, _
Optional ByVal High As Integer = 100) As Integer
Return objRandom.Next(Low, High + 1)
End Function
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click
Dim textOrNum As Integer = 0
Dim code As String = Nothing
Dim addHyphen As Integer = 0
Dim randomChars As String = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
Do
If textOrNum = 0 Then
code += (randomChars.Chars(GetRandomNumber(0, 25)).ToString)
textOrNum = 1
addHyphen += 1
ElseIf textOrNum = 1 Then
code += (GetRandomNumber(0, 9).ToString)
addHyphen += 1
textOrNum = 0
End If
If addHyphen = 5 Or addHyphen = 10 Or addHyphen = 15 Then
code += "-"
End If
Loop Until code.Length = 23
TextBox1.Text = code
End Sub
End Class
4. Try to make your program
look as appealing as
possible. Add pictures of
your niche, or find a
VB.NET theme. Your goal
is to convince your viewer.