dollarfinder
Junior member
- Messages
- 11
- Likes
- 0
If you want to give the user of the program a try-before-buy program you can limit the usage of your program by limited period of time and after this period the program will not work.
Use the code below to limit your program for period of time.
int start()
{
string expire_date = "2006.31.06"; //<-- hard coded datetime
datetime e_d = StrToTime(expire_date);
if (CurTime() >= e_d)
{
Alert ("The trial version has been expired!");
return(0);
}
// your normal code!
return(0);
}
Use the code below to limit your program for period of time.
int start()
{
string expire_date = "2006.31.06"; //<-- hard coded datetime
datetime e_d = StrToTime(expire_date);
if (CurTime() >= e_d)
{
Alert ("The trial version has been expired!");
return(0);
}
// your normal code!
return(0);
}