Hi guys, I'm back with a new question in continuation of my project ;)
Quote
I'm creating a small project in Visual Basic 6 for a class I'm taking (Yes we have to create the project in VB6, teacher orders :) )
And so I'm creating a small VB6 Setup program to install a future program I might create...
I'm creating a form for a Serial Number, and it's basically done.
On user Serial number error:
So I have all fields set to setfocus when 5 characters are entered it jumps to the next text box, when 25 characters are inserted it unlocks the next button and runs an if to check the serial.
If the 25 characters don't match the serial, it gives the error msg..
Private Sub CMDNEXT_Click()
If TXTSERIAL1 = 11111 And TXTSERIAL2 = 11111 And TXTSERIAL3 = 11111 And TXTSERIAL4 = 11111 And TXTSERIAL5 = 11111 Then
MsgBox "Test"
Unload Me
FRM04.Show
Else
IMGWARNING.Visible = True
LBLERROR.Visible = True
CMDNEXT.Enabled = False
End If
End Sub
Now as you can see the Serial validation I made is fairly basic (I'm a VB6 noob :blush: ) and If I had to sell (remember this is just a personal project for a course) the program to 5 people, I have to enter 5 serials in the If cycle...
So I was wondering without creating too much complex code, is there a way of creating a random serial code creator ( In vb6, just another exe that creates basic 25 characters serial) , and use it in my project, like each field if it the combination of numbers makes 15 in a text box is valid or something ( did I make sense? :laugh: ) ?
Question
Digitalfox
Hi guys, I'm back with a new question in continuation of my project ;)
I'm creating a form for a Serial Number, and it's basically done.
On user Serial number error:
So I have all fields set to setfocus when 5 characters are entered it jumps to the next text box, when 25 characters are inserted it unlocks the next button and runs an if to check the serial.
If the 25 characters don't match the serial, it gives the error msg..
Now as you can see the Serial validation I made is fairly basic (I'm a VB6 noob :blush: ) and If I had to sell (remember this is just a personal project for a course) the program to 5 people, I have to enter 5 serials in the If cycle...
So I was wondering without creating too much complex code, is there a way of creating a random serial code creator ( In vb6, just another exe that creates basic 25 characters serial) , and use it in my project, like each field if it the combination of numbers makes 15 in a text box is valid or something ( did I make sense? :laugh: ) ?
Thanks guys :)
Link to comment
https://www.neowin.net/forum/topic/978416-vb6-creating-serial-number-code/Share on other sites
11 answers to this question
Recommended Posts