Results 1 to 6 of 6

Thread: Creating a "trial" win form

  1. #1

    Thread Starter
    New Member
    Join Date
    Oct 2006
    Posts
    6

    Creating a "trial" win form

    Hi, this is my first post, please bear with me If I've made any mistake.

    I'm currenly creating a win form with c sharp (1.1). I was wondering how can I make a "trial" version so that the program can only be used for, let's say, 30 days after installation.

    I was thinking of using the datetime object to record the installation date, but then what if the client change the system date after the installation? I noticed that those trial software we got from the internet will indeed stop functioning after certain amount of days, regardless of how we modify our system date. I wonder how they did it ?

    I've been googling for this but couldn't find any solution. Please clue me on this. Thanks...

  2. #2
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: Creating a "trial" win form

    You need to store the date somewhere when the software is installed or first run. You then read that date and compare it to the current date each time the app is run. The trick is to hide the data well enough that it is not likely to be tampered with. You also need to safeguard against the user turning their clock back. I would suggest purchasing a licensing component if you intend to do this regularly. There are numerous cheap options available. I've previously used Quick License Manager, which was fine, and currently use Infralution Licensing System, which is .NET-based.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  3. #3

    Thread Starter
    New Member
    Join Date
    Oct 2006
    Posts
    6

    Re: Creating a "trial" win form

    Thanks for your help. Purchasing a component maybe be my last option. I figure that I could make my program "usage limited" (how many times they can execute the program) rather than "time limited". That would be rather easy.

    Right now I'm curious on how they achieve "time limitation" of a software. I think the difficult part is to know when the client modify their system clock. We will have to get the date before and after the changes to keep the evaluation period right. I did some searchs and found this event:

    Code:
    public static event EventHandler TimeChanged
    It was decribed in MSDN that this event occurs when users change the system time. I will try to create a time-based evaluation program and share my findings here. Thanks again.

  4. #4
    Frenzied Member axion_sa's Avatar
    Join Date
    Jan 2002
    Location
    Joburg, RSA
    Posts
    1,724

    Re: Creating a "trial" win form

    Alternatively, store the date when the application closes, and compare that against the system clock the next time it launches...

  5. #5
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: Creating a "trial" win form

    You really have to do both what was suggested in posts #3 and #4 to be thorough, because the clock could be changed while your app is running or while it's not.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  6. #6
    G&G Moderator chemicalNova's Avatar
    Join Date
    Jun 2002
    Location
    Victoria, Australia
    Posts
    4,246

    Re: Creating a "trial" win form

    Or.. if your application is definitely going to be used on a PC with an internet connection.. you could store the information on a web server, and check it before loading. You could have "trial accounts" for users, who have to login each time they run the trial version of your software.

    chem

    Visual Studio 6, Visual Studio.NET 2005, MASM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width