Question Create a simple trial feature for your program

Chris11

Active member
Joined
Jul 12, 2009
Messages
29
Programming Experience
1-3
I want to be able to create a simple trail feature for my program. Normally i base i on how many times the user has opened my the program. This time i want to be be based on what day the user starts using it, and then add on the trail period?

Could anyone help me by starting my off?
 
There are several ways to this:

A.) Writing the first start-time into a file/registry and checking it back against the computer time.
B.) Writing the first start-time into a file/registry and checking it back against a time server. But you'd have a problem if that one isn't reachable.
C.) Let the user register, give him a key which has an encoded/hidden 'End-Date' within it.
D.) Create a profile of the computer and register the program with an Online database, with checkback if it is still within the period.

My ideas to this,
Bobby
 
I am trying to show how many days there are left from today, to the finsh date. How can I do that?
 
Last edited:
I am trying to show how many days there are left from today, to the finsh date. How can I do that?

Sorry that I can't give you exact code... but something along the lines of [this isnt visual basic, but just a outline for what you have to do]:
VB.NET:
Dim var1 = CheckRegistry.DayExpire
Dim var2 = My.Computer.Time.Day
Dim var3 = var2 - var1
This is very sketchy, as I have no idea what the commands to check the value of a registry or the current date of your computer are, but am almost certain they are there.
Basically, you'd have to do something along the lines of checking the month and including that in the Dim for var1 and var2.
Once you have var1 and var2 set correctly to VB.Net's standards, you just use var3 to get the amount of days left.
I am new to VB.Net, but not to coding in general. I am guessing you can make a textbox that is blank, and on the form load event sub... have it check how many days there are left and put that number in for whatever textbox you want.

I hope this helps you out a tad. If you don't get or can't find exact answers here, may I suggest googling some things you may be having trouble on, such as defining var1 and var2. Sorry if I was little to no help to you, I am trying. :) We all start out as newbies to the language, don't we? ;)
 
I came up with something like that, but I got -number....

Does anyone know the correct way to take away a date from a date?
 
Last edited:
Back
Top