Click here to Skip to main content
15,884,237 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i want to use my client application for only 15 days.how it is possible any code.
it is possible in c# windows application.
Posted

Yes.
But...

And it's a fairly big "but" - it's never that difficult to get round, if people want to, unless you do an online check. Changing the system date (for example) is pretty easy, and will fool basic systems.

It depends how much you want to protect your code, and how much effort you want to put in (and how much you want to risk annoying potential customers)

Google can help you here (try "demo version c#" - that will give you a large set of useful results), or see here: Application Trial Maker[^]
 
Share this answer
 
Yes u can restrict your application after 15 days to not run.

Just write the following code on main startup form:


DateTime dtAppBuild = System.IO.File.GetLastWriteTime(Application.ExecutablePath);
if (dtAppBuild.AddDays(15) < DateTime.Now) Application.Exit();
 
Share this answer
 
Comments
16041984 22-Sep-12 5:40am    
on which event of form i use this code?? on form load or where
Dineshshp 22-Sep-12 5:52am    
on "Form_Load"
16041984 22-Sep-12 5:47am    
thx dear i am add this code on form load..and change the date of system after 15 days and it works application exit.thx yaar.god bless u
Dineshshp 22-Sep-12 5:53am    
i m always for u dear. bye...

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