- Joined
- May 18, 2010
- Sythe Gold
- 0
- Messages
- 85
Ever wondered how those programs show another code when you click generate on one of those key generator for a program?
- I do not claim i have used the Sony Vegas 9 key generator put many people are familiar with that one being that it includes a bunch more key generating options>_<
Well to start off Bring up Visual basic 2010
and select windows form
now create a button and name it generate
and also place a combo box somewhere in the program
Now go into the combo box coding and add 4 options
Double click the buttonand enter the coding area
Now copy and paste this source code
Dim key As Integer
key = Int(Rnd() * 5)
If ComboBox1.Text = "Option 1" Then
Select Case key
Case 1
TextBox1.Text = "1015-5382-6273-2462"
Case 2
TextBox1.Text = "2096-2675-2915-3634"
Case 3
TextBox1.Text = "8474-3927-2715-2862"
Case 4
TextBox1.Text = "7462-7628-2502-2658"
Case 5
TextBox1.Text = "6387-9733-5175-9165"
End Select
End If
If ComboBox1.Text = "Option 2" Then
Select Case key
Case 1
TextBox1.Text = "476s-h3aj-93hf-02hr"
Case 2
TextBox1.Text = "02jg-9j3j-93ha-m2jf"
Case 3
TextBox1.Text = "3fka-3927-f3na-2862"
Case 4
TextBox1.Text = "7462-in3a-2502-o3dv"
Case 5
TextBox1.Text = "g3gs-h6jh-1fsf-f3xf"
End Select
End If
If ComboBox1.Text = "Option 3" Then
Select Case key
Case 1
TextBox1.Text = "62h5-4ytj-35yx-0254"
Case 2
TextBox1.Text = "fwef-r23s-t2tx-g4sg"
Case 3
TextBox1.Text = "324g-3927-f3na-g4gx"
Case 4
TextBox1.Text = "g5s3-ig52-34sg-63t4"
Case 5
TextBox1.Text = "g3gs-f3ay-7ufh-1gsg"
End Select
End If
If ComboBox1.Text = "Option 4" Then
Select Case key
Case 1
TextBox1.Text = "2562-g4a5-u652-157h"
Case 2
TextBox1.Text = "j0f3-53hj-chj4-j4tq"
Case 3
TextBox1.Text = "ft3d-2739-g4dy-h56h"
Case 4
TextBox1.Text = "7xg4-ig4d-g5zg-o5gw"
Case 5
TextBox1.Text = "g46s-g426-g5w2-yh45"
End Select
End If
Where I enter Option 1,2,3,4 you will enter the options in which you entered in your combo box.
Make sure you enter them exactly as they look visual basic does not guess:idea:
Ok so where i have Textbox1.text = "xxxxxxxxxxxxxx"
You can enter what ever you want to come up for that combo box when they click generate.
I put in 5 potential different sequences you can enter
I hope this helps in your creation of a project in Visual basic 2010, I also believe this works with 2008 but i'm not positive and it won't hurt to try
- I do not claim i have used the Sony Vegas 9 key generator put many people are familiar with that one being that it includes a bunch more key generating options>_<
Well to start off Bring up Visual basic 2010
and select windows form
now create a button and name it generate
and also place a combo box somewhere in the program
Now go into the combo box coding and add 4 options
Double click the buttonand enter the coding area
Now copy and paste this source code
Dim key As Integer
key = Int(Rnd() * 5)
If ComboBox1.Text = "Option 1" Then
Select Case key
Case 1
TextBox1.Text = "1015-5382-6273-2462"
Case 2
TextBox1.Text = "2096-2675-2915-3634"
Case 3
TextBox1.Text = "8474-3927-2715-2862"
Case 4
TextBox1.Text = "7462-7628-2502-2658"
Case 5
TextBox1.Text = "6387-9733-5175-9165"
End Select
End If
If ComboBox1.Text = "Option 2" Then
Select Case key
Case 1
TextBox1.Text = "476s-h3aj-93hf-02hr"
Case 2
TextBox1.Text = "02jg-9j3j-93ha-m2jf"
Case 3
TextBox1.Text = "3fka-3927-f3na-2862"
Case 4
TextBox1.Text = "7462-in3a-2502-o3dv"
Case 5
TextBox1.Text = "g3gs-h6jh-1fsf-f3xf"
End Select
End If
If ComboBox1.Text = "Option 3" Then
Select Case key
Case 1
TextBox1.Text = "62h5-4ytj-35yx-0254"
Case 2
TextBox1.Text = "fwef-r23s-t2tx-g4sg"
Case 3
TextBox1.Text = "324g-3927-f3na-g4gx"
Case 4
TextBox1.Text = "g5s3-ig52-34sg-63t4"
Case 5
TextBox1.Text = "g3gs-f3ay-7ufh-1gsg"
End Select
End If
If ComboBox1.Text = "Option 4" Then
Select Case key
Case 1
TextBox1.Text = "2562-g4a5-u652-157h"
Case 2
TextBox1.Text = "j0f3-53hj-chj4-j4tq"
Case 3
TextBox1.Text = "ft3d-2739-g4dy-h56h"
Case 4
TextBox1.Text = "7xg4-ig4d-g5zg-o5gw"
Case 5
TextBox1.Text = "g46s-g426-g5w2-yh45"
End Select
End If
Where I enter Option 1,2,3,4 you will enter the options in which you entered in your combo box.
Make sure you enter them exactly as they look visual basic does not guess:idea:
Ok so where i have Textbox1.text = "xxxxxxxxxxxxxx"
You can enter what ever you want to come up for that combo box when they click generate.
I put in 5 potential different sequences you can enter
I hope this helps in your creation of a project in Visual basic 2010, I also believe this works with 2008 but i'm not positive and it won't hurt to try




