30-Day Trial Feature
Heres your chance to share your own tutorials with the community. Just post them on here. If your lucky they may even be posted on the main site.
Hello,
Ive got a trial feature for you should anyone need it for your application. It works by using the "Date" and heres how it works:
![Image]()
When someone runs your application for the first time it will grab the current date and add '30' days to it and then store this date. The user can run your application as much as they want for 30 days. If they run the application after 30+ days then it will ask for an activation key, if they dont enter a key or if the key is wrong then the application will not start untill the correct key is entered. They can also activate the program before the end of the 30 day trial.
You can select how many days the trial should run for and the activation key required.
This is how to make it:
Start a new project
Place a button on the form (this will be the activation button)
Go into Project > Project Properties
Now enter the following 2 settings in the 'Settings' tab
apptrial - with a value of "1"
trialcode - leave this value blank
Then add this code to your project:
. Compile and run!
It would be very easy to integrate this code to any of your current or future applications as it only uses one button and the code is very short ;) .
Source-Code:
Thank you and happy coding.
Ive got a trial feature for you should anyone need it for your application. It works by using the "Date" and heres how it works:

When someone runs your application for the first time it will grab the current date and add '30' days to it and then store this date. The user can run your application as much as they want for 30 days. If they run the application after 30+ days then it will ask for an activation key, if they dont enter a key or if the key is wrong then the application will not start untill the correct key is entered. They can also activate the program before the end of the 30 day trial.
You can select how many days the trial should run for and the activation key required.
This is how to make it:
Start a new project
Place a button on the form (this will be the activation button)
Go into Project > Project Properties
Now enter the following 2 settings in the 'Settings' tab
apptrial - with a value of "1"
trialcode - leave this value blank
Then add this code to your project:
Code: Select all
Change the code "ABCD123" to whatever you want the activation key to be and if you want to change how many days the trial should run, just change this piece of code with the number of days:Public Class Form1
'THIS ALLOWS ACTIVATION BEFORE 30 DAY TRIAL IS UP
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim trialkey = InputBox("Please enter your activation key:", "Activation")
If trialkey = "ABCD123" Then
My.Settings.trialcode = "ABCD123"
My.Settings.Save()
End If
End Sub
'THIS CHECKS IF THE PROGRAM IS ACTIVATED OR STILL IN TRIAL WHEN RUN
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim tcode = Convert.ToString(My.Settings.trialcode)
If (tcode = "ABCD123") Then
Button1.Visible = False
Else
isittrial()
End If
End Sub
'THIS CHECKS IF ITS FIRST TIME BEING USED AND IF THE 30 DAY TRIAL HAS EXPIRED
Private Sub isittrial()
Dim trialtime As Date = Now
Dim currentdatetime As Date = Now
trialtime = trialtime.AddDays(30) 'SET THIS TO HOWEVER MANY DAYS YOU WANT THE TRIAL TO RUN FOR
Dim ttime = Convert.ToString(My.Settings.apptrial)
If (ttime = "1") Then
My.Settings.trialcode = trialtime
My.Settings.apptrial = "0"
My.Settings.Save()
End If
If (currentdatetime > trialtime) Then
Dim trialkey = InputBox("Your trial as expired. Please enter your activation key:", "Activation")
If trialkey = "ABCD123" Then
My.Settings.trialcode = "ABCD123"
My.Settings.Save()
Else
Me.Close()
End If
End If
End Sub
End Class
Code: Select all
And thats it trialtime = trialtime.AddDays(30)

It would be very easy to integrate this code to any of your current or future applications as it only uses one button and the code is very short ;) .
Source-Code:
Thank you and happy coding.
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.
Hi
Cool 8-)
Another good Straight to the point bit of Coding cooll;
Cool 8-)
Another good Straight to the point bit of Coding cooll;
good program, this is great for people offering a trial version of the application.
If i succeed in my program, im sure to use this.
Thanks
If i succeed in my program, im sure to use this.
Thanks

Cool nice application.
But sometimes people can nchange there date back to the date they got their program so i dont know it might not be affective if they change their date back.
I have used this for one of my programs and ty
Robby1998
But sometimes people can nchange there date back to the date they got their program so i dont know it might not be affective if they change their date back.
I have used this for one of my programs and ty

Robby1998
If this works out correctly for me, I'm going to put it in my VOS!
I agree with Dummy1912, maybe have a file online and add "1" everyday its run or something like that ?
We shall let the revolution begin.. the revolution for freedom, freedom against censorship. We shall fight in the fields and in the streets, we shall fight in the hills; we shall never surrender
i don't like this way
you can easely find that file and delete it.
so there you have 30 days again :(
Dummy1912
Code: Select all
because if you are really good with your pc and know a little of itMy.Settings.
you can easely find that file and delete it.
so there you have 30 days again :(
Dummy1912
visit us on:
http://www.softpedia.com/get/System/Lau ... -Run.shtml
Check it out ! http://www.softpedia.com/publisher/I-A- ... 90017.html
Check it out ! http://www.softpedia.com/get/Desktop-En ... lock.shtml
http://www.softpedia.com/get/System/Lau ... -Run.shtml
Check it out ! http://www.softpedia.com/publisher/I-A- ... 90017.html
Check it out ! http://www.softpedia.com/get/Desktop-En ... lock.shtml
Dummy1912 wrote:i don't like this waySolutions :
Code: Select allbecause if you are really good with your pc and know a little of itMy.Settings.
you can easely find that file and delete it.
so there you have 30 days again :(
Dummy1912
1)if the application.setting file is missing then the application would shutdown (or return the trail value to 0)
2)write a registry key ( but you can deny it with spybot...)
3)the application settings could also be stored on your application i think
Copyright Information
Copyright © Codenstuff.com 2020 - 2023