Tuesday, August 4, 2015

Create a keygen VB.net


Create a keygen in VB.net


Today I will teach you how to create a very simple key generator in VB.net
A key generator (or keygen) is a very simple program that provides you a collection of keys for a certain program. 


How to create a project in Visual Studio?

Exists many ways to create a new project in VS. For example, when you open your VS program, in the Start Page you will see the option New Project ... 
If you can´t see the Start Page you can also click in File > New Project > Select Visual Basic > Windows Forms Application
Rename your project name if you want and click OK.
It´s easy! 

What controls we need ?

For a simple keygen all you need is a TextBox and a Button. Advanced keygens sometimes also verify if the specific program is installed and if the keys are available for that version. There also keygens for multi-programs. In that case you can use a checkbox to specify the program.

Code

After you add in to your Form a textbox and a button, double-click in the Button to create the Event Click

Now, I released two options: 
This first one generate the keys using the same sequence 

    Dim i As Integer = 0
    Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click

        Dim list As New ListBox 'Creates a new listbox control
        With list.Items
            .Add("key1") 'these Items are the keys
            .Add("key2")
            .Add("key3")
            .Add("key4")
            .Add("key5")
        End With

        If i = list.Items.Count Then
            i = 1
            TextBox1.Text = list.Items(0)
        Else
            TextBox1.Text = list.Items(i)
            i = i + 1
        End If
    End Sub

This second one generate the keys aleatory

Dim Key As Integer
        Key = (Rnd() * 5) 'Number of keys ... in this example are 5
        Select Case Key
            Case 1
                TextBox1.Text = "Serial Key Here!1"
            Case 2
                TextBox1.Text = "Serial Key Here!2"
            Case 3
                TextBox1.Text = "Serial Key Here!3"
            Case 4
                TextBox1.Text = "Serial Key Here!4"
            Case 5
                TextBox1.Text = "Serial Key Here!5"
End Select


Need help?

I hope you enjoyed. If you need help please send an e-mail to antivirusdownloadfullversion@outlook.com

No comments:

Post a Comment