Click here to Skip to main content
15,894,825 members
Please Sign up or sign in to vote.
2.05/5 (4 votes)
See more:
tell me the ways to Implementing a 30-day trial period in a C#.net application.
Posted
Updated 4-Aug-16 3:54am
Comments
dimpledevani 6-Feb-14 1:45am    
You can store the install date somewhere in your application's registry or in database and then compare that date every time you lunch your application.If it crosses more than 30 days, then you can get your requirement done.
opuspriyanka 6-Feb-14 5:46am    
Please provide the code for same in c#

You must obfuscate your C# Application to make it hard to crack.
 
Share this answer
 
I think this is a good question to start with.

Here is an excellent article[^] if you want to learn regarding building trial versions of software. It covers:
Where to Store the Expiration Data
How to detect system clock manipulation

You may also want to read another piece[^] from the same author to broaden your knowledge.

Finally, some SO discussions such as this[^] may also help.

[Please accept/up-vote answers or solutions that work for you to encourage others]
 
Share this answer
 
C#
private void Form1_Load(object sender, EventArgs e)
      {

          if(DateTime.Now.ToString("dd")=="04" && DateTime.Now.ToString("MM")=="08" && DateTime.Now.ToString("yyyy")==("2016"))
          {

              Application.Exit();
          }

      }
 
Share this answer
 
v3
Comments
Dave Kreskowiak 4-Aug-16 10:25am    
This question is TWO YEARS old and your solution isn't applicable to the problem and is very easily worked around.

Don't post answers to questions this old.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900