Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[TuT] How to create a Simple Keygen?
#1
[TuT] How to create a Simple Keygen?




Description:

Code:
For Generate

Dim Key As Integer
Key = Int( Rnd() * 6)
Select case Key
Case 1
Text Box 1. Text = " 858-787-767-809"
Case 2
Text Box 1. Text = " 158-787-767-809"
Case 3
Text Box 1. Text = " 558-787-767-809"
Case 4
Text Box 1. Text = " 358-787-767-809"
Case 5
Text Box 1. Text = " 658-787-767-809"
Case 6
Text Box 1. Text = " 758-787-767-809"


For Exit

End

[Image: 6c221674de.png]
Reply
#2
Why is your code so jumbled up? And also you don't end your case statement.


Although i'm confused as to why you're making it even that difficult. Try something like this:
Code:
Public KeyA() As String = {"key1", "key2", "key3", "key4", "key5"}

    Private Shared Function ReturnKey(ByVal InputArray() As String, ByVal LastKeyIndex As Integer)
        Dim Key As New Random
        Return InputArray(Key.Next(0, LastKeyIndex))
    End Function

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        MsgBox(ReturnKey(KeyA, 4))
    End Sub
Reply
#3
Thanks for the suggestion dude.
[Image: 6c221674de.png]
Reply
#4
You should also have posted a text one.

But it is done. Big Grin
Reply
#5
(01-10-2012, 07:25 AM)Techie. Wrote: You should also have posted a text one.

But it is done. Big Grin

A text one? It is already in text, you create the keys and put them in manually though.
Reply
#6
Hmm... Interesting source code. Thanks for the contribution.
Reply
#7
This is very helpful, especially to new users. Good job!
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  [TUT] How to make a simple WebBrowser in VB 2010! [TUT] - [ Pictures] Statics 95 61,969 10-07-2012, 06:56 AM
Last Post: a99
  [TUT]Auto-Update System[TUT] HB Virus 3 2,428 01-07-2012, 02:21 PM
Last Post: Mastermrz
  [TUT]Enable and Disable TaskManger in vb.net [TUT] HB Virus 4 3,175 12-19-2011, 10:10 AM
Last Post: euverve
  [TuT]How to create a Simple Web browser Jinu 2 752 12-17-2011, 03:13 PM
Last Post: HB Virus
  [TuT] VB6 Message Box Spammer [TuT] HakkuR* 30 7,558 06-06-2011, 04:43 PM
Last Post: Black Demon

Forum Jump:


Users browsing this thread: 1 Guest(s)