Click here to Skip to main content
15,887,135 members
Please Sign up or sign in to vote.
3.00/5 (2 votes)
See more:
Hi All
I am working on C# windows application I want to stop run my C# windows application after a specific date
Please Help


Thanks & Regards
Indrajit Dasgupta
Posted

If you want to turn your application into a trial version which can also be upgraded to a full version there is an article here on CP that will give you a solution to your problem: Application Trial Maker[^].

Regards,

Manfred
 
Share this answer
 
v2
Comments
fjdiewornncalwe 31-Jan-12 13:18pm    
+5. This is what I got out of the question as well.
Sergey Alexandrovich Kryukov 31-Jan-12 16:09pm    
I guess this is the answer, my 5.
OP is recommended to accept it formally (green button).
--SA
Place a timer component on your form, configure an interval of 60000 milliseconds. In the Timer event handler, check the current date. If it is your specific date, terminate the application.
 
Share this answer
 
Comments
Manfred Rudolf Bihy 31-Jan-12 10:45am    
I'm not sure that is what OP is really after, but it does solve the problem as stated. 5+ :)
I actually think OP is trying to make a trial version out of his application. There's a nice article about it on CP: Application Trial Maker
If you will rely on windows datetime than user may change date-time , what I have done in my application I am maintaining a log detail for this purpose, On each login and logout I am saving it to database, before login I get last logout and match it with datetime.now if its less than last logout then it shows error same thing is done on logout.
after marching datetime.now with last logout I am calculating days,
for security purpose I am saving login and logout in encrypted form, I hope this will work for me.
if any one have better solution please let me know because tomorrow or day after tomorrow I am going to deploy my app on client pc.

Regards
 
Share this answer
 
What you mean by stop, just exiting on reaching that date ?
Otherwise you can add checking on Main , and if the currentDate = DeadDate, exit your appliation by showing some message to user :)

You can also use webservices to get std Dates, that does not depend upon the system dates.
 
Share this answer
 

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