Serial system for applications
Do you need something made? then ask in here.
Forum rules
Please LOCK your topics once you have found the solution to your question so we know you no longer require help with your query.
Please LOCK your topics once you have found the solution to your question so we know you no longer require help with your query.
10 posts
Page 1 of 1
Hi community , I dont know if this exist and free but i need a little system like the 30 day trial and activation service ...
but what i need is not like that what i need is a system when i program a couple of key only and no user name like the windows registration or other service becose i wanna distrubute my application with serial but i wanna not give an username fot all license sticker.
My key format would like the windows serial key :
FR4B7-G9VVC-PDKT6-HBHXY-DYDJ6 (its not valid windows key ... sorry )
thank in advance
but what i need is not like that what i need is a system when i program a couple of key only and no user name like the windows registration or other service becose i wanna distrubute my application with serial but i wanna not give an username fot all license sticker.
My key format would like the windows serial key :
FR4B7-G9VVC-PDKT6-HBHXY-DYDJ6 (its not valid windows key ... sorry )
thank in advance
admin@adosrv.net
Owner of ado-srv.net softwares network.
Owner of ado-srv.net softwares network.
Hello dan2130,
I think I know what you mean, you want to embed the serial keys into your application and give them out to people without all the management stuff?.
If that is the case then you could do this. In the application you want to use this trial feature in click on "Project" in the menu bar at the top of VB and select "Yourproject Properties", then click the "Settings" tab and enter the following setting with its value:
Setting name: trial
Setting Value: first
Then go into your applications MAIN form, this would usually be "Form1" unless you have renamed it. Go into code-view and enter this code inside the "Form_Load" event:
Now you need to add 5 TextBox controls and 1 Button control to the new form. Layout the textboxs as follows:
TextBox1 TextBox2 TextBox3 TextBox4 TextBox5
And place the button underneath them so it looks something like this:
![Image]()
Then inside the buttons click event code add this code:
.
Heres the source files for this code if you want to see how it all works.
Download: Happy coding! cooll;
I think I know what you mean, you want to embed the serial keys into your application and give them out to people without all the management stuff?.
If that is the case then you could do this. In the application you want to use this trial feature in click on "Project" in the menu bar at the top of VB and select "Yourproject Properties", then click the "Settings" tab and enter the following setting with its value:
Setting name: trial
Setting Value: first
Then go into your applications MAIN form, this would usually be "Form1" unless you have renamed it. Go into code-view and enter this code inside the "Form_Load" event:
Code: Select all
You will notice that in this part of the code "Dim theSecondForm As New Form2()" you may need to change the word "Form2" to the name of the new form you will create in this next step. Thats all you need to do on your main form so save that and then you need to add a new form to your project by again clicking "Project" in the top menu and selecting "Add Windows Form". Dim currentdatetime As Date = Now
If Convert.ToString(My.Settings.trial) = "first" Then
Dim trialtime As Date = Now
trialtime = trialtime.AddDays(30) 'SET THIS TO HOWEVER MANY DAYS YOU WANT THE TRIAL TO RUN FOR
My.Settings.trial = trialtime
My.Settings.Save()
End If
If Convert.ToString(My.Settings.trial) = "fullversion" Then
'DO NOTHING
ElseIf currentdatetime > Convert.ToString(My.Settings.trial) Then
Dim theSecondForm As New Form2()
theSecondForm.ShowDialog()
Me.Close()
End If
Now you need to add 5 TextBox controls and 1 Button control to the new form. Layout the textboxs as follows:
TextBox1 TextBox2 TextBox3 TextBox4 TextBox5
And place the button underneath them so it looks something like this:

Then inside the buttons click event code add this code:
Code: Select all
That is the code where you will put your serial keys and I have started you off by adding 2 demo keys which you can change as you wish. You can add more if you want by simply adding a new "Case" statement to the group like:Dim serialkey = TextBox1.Text + "-" + TextBox2.Text + "-" + TextBox3.Text + "-" + TextBox4.Text + "-" + TextBox5.Text
Select Case serialkey
Case "123-abc-123-abc-123"
My.Settings.trial = "fullversion"
My.Settings.Save()
MsgBox("Registration successfull. Thank you.")
Application.Restart()
Case "123-456-123-456-123"
My.Settings.trial = "fullversion"
My.Settings.Save()
MsgBox("Registration successfull. Thank you.")
Application.Restart()
Case Else
MsgBox("Invalid Key!. Please check you have entered it correctly and try again.")
End Select
Code: Select all
What this whole code does is it will set a 30-Day trial in your application the first time someone uses it and when the 30 days is over it will stop working and ask them to enter one of those serial keys in order to use it. Once a serial key has been entered correctly your application will run forever without trial Case "POP-CORN-POP-CORN-POP"
My.Settings.trial = "fullversion"
My.Settings.Save()
MsgBox("Registration successfull. Thank you.")
Application.Restart()

Heres the source files for this code if you want to see how it all works.
Download: Happy coding! cooll;
You do not have the required permissions to view the files attached to this post.
Welcome to CodenStuff.com Learn Code, Love Code. Thank you for being a member of the community.
Thanks for your rapidity you are the best !
But i have a little problem in the form 1 i dont know if that is related with my Visual basic 2008 or my windows xp pro french version but i post you a screenshot of my problem (sorry for the french error message )
![Image]()
rapidly the first line of the error wizard is
the chain conversion of "0" in type 'Date' is invalid.
But i have a little problem in the form 1 i dont know if that is related with my Visual basic 2008 or my windows xp pro french version but i post you a screenshot of my problem (sorry for the french error message )

rapidly the first line of the error wizard is
the chain conversion of "0" in type 'Date' is invalid.
admin@adosrv.net
Owner of ado-srv.net softwares network.
Owner of ado-srv.net softwares network.
Hello,
I think its because you have "trialtime.AddDays(0)" set to "0" in this line:
Hope that helped cooll;
I think its because you have "trialtime.AddDays(0)" set to "0" in this line:
Code: Select all
Im unable to replicate the error though. Try changing the value back to "30" and see if you get the error?.trialtime = trialtime.AddDays(30) 'SET THIS TO HOWEVER MANY DAYS YOU WANT THE TRIAL TO RUN FOR
Hope that helped cooll;
Welcome to CodenStuff.com Learn Code, Love Code. Thank you for being a member of the community.
it make the same thing with 30.
do you know how to remove the time function ?
example the costumer have no trial time and he have to register the aplication before first use it can be more simple.
do you know how to remove the time function ?
example the costumer have no trial time and he have to register the aplication before first use it can be more simple.
admin@adosrv.net
Owner of ado-srv.net softwares network.
Owner of ado-srv.net softwares network.
Hello,
Yes if you dont want the trial feature and want to ask for a key straight away just change all that "Form_load" event code to this:
Happy coding! cooll;
Yes if you dont want the trial feature and want to ask for a key straight away just change all that "Form_load" event code to this:
Code: Select all
That will open the key window straight away everytime the application is run until a valid key is entered.Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
If Convert.ToString(My.Settings.trial) = "fullversion" Then
'DO NOTHING
Else
Dim theSecondForm As New Form2()
theSecondForm.ShowDialog()
Me.Close()
End If
End Sub
Happy coding! cooll;
Welcome to CodenStuff.com Learn Code, Love Code. Thank you for being a member of the community.
Thanks , i was looking for this one because i want that my programm needs a serial key before it can work.
also how can i make it possible to use more than only one specific serial ?
Greetz,
GAMEKINGZ
also how can i make it possible to use more than only one specific serial ?
Greetz,
GAMEKINGZ
dan2130 wrote:i dont understandwell i read the main post twice and found my answer on my question.
i wanted to add more serials. but i found in main post so its solved now.
Greetz,
GAMEKINGZ
10 posts
Page 1 of 1
Copyright Information
Copyright © Codenstuff.com 2020 - 2023