Click here to Skip to main content
15,912,400 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am working on project In which I am working on software which expire in 60 days after it finish the trial period I need to find out how to inactivate Manu Item only tab need to active is Password tab.

Thank you very much.
Posted

1 solution

Well, you can display a modal dialog to enter the key... and if the user cancel that dialog immediatly exit the application. That way, you don't really have to disable the menu... You simply display the dialog at startup if the trial is expired... and you might also display afterward by checking the time after some period of uses. Or you might simply check if the trial is expired in critical commands and if so display the dialog...

You can read existing articles on the subject and similar questions in other forums.

Application Trial Maker[^]

Create Trial Version of an application[^]

http://bytes.com/topic/c/answers/219770-code-make-trial-version-software-release[^]

Need Advice on Implementing a Time-limited Trial[^]

You can also look for products that are intended to make trials... Here are some examples:

Protection PLUS[^]

Search of trial on ComponentSource[^]
 
Share this answer
 
v2
Comments
Philippe Mori 3-Sep-11 21:17pm    
By the way, be aware that simple solutions are easy to break... and more complex one have a cost (product price and/or development time). And the more your application is expansive and usefull for a wide public, the more there are chances that it get cracked...
VIJay Patel 2011 4-Sep-11 19:09pm    
When trial period ends I need one of the form pop up which carry's Product info.
is there is Respond .redirect in VC++ 6.0 somthing metioned like that instead
"Trial period expired.";

Thank you very much.
VIJay Patel 2011 4-Sep-11 19:23pm    
What I mean is in Web Apps there is Response.Redirect if there is similer in WIN FORM in VC++ 6.0.

Thank you very much.
Vijay Pate 12-Sep-11 11:37am    
COleDateTime is not changing and if I am understanding correctly follwing statement : "You have %d days left to renew ADDapt Software.", daysLeft );
%d has to be change from 29 days to 28 and so on. and it dosent.
any comments.

Thank you very much.
Vijay Pate 21-Sep-11 14:57pm    
I am working on project requires to find the TIMESPAN between software installation date and Software expiring date. I need software to pop up screen to calculate 30 days and it reduces as day has gone. As it is mentioned in first AfxMessageBox like:
{ strMessage.Format( "ADDapt was not activated within 30 days of " "installation and is currently not functional.\n" "To activate please call Avtron Field Service at 000-000-1230 " "ext 1214.\n" "The 30 days trial period starts on the day you installed " "ADDapt.\n" "You have %d days left to renew ADDapt Software.", daysLeft );
I need to show the days left in %d

Once the software reches 27th day I need software to view following Message :
strMessage.Format(_T(“ADDapt is operating under a trial license. \n
_T(“You have %d” “ days to activate ADDapt with valid license, \n”)
_T(“To activate, Please call Avtron Field Service at 000-000-0000.”), daysLeft);
Once software expire from trial period I need to show security page which has Productcode which will activate the software

My biggest hurdle is to register this product in window registery and once the installdate is figured out then it is easy to work with

Thank you very much

Vijay Patel
feel free to call at 4.1.9.7.8.7.8.5.8.0

CODE I WORKED is as follow:

COleDateTime timeStart, timeEnd;
COleDateTimeSpan timePassed;
int daysLeft = 0;
timeStart = COleDateTime::GetCUrrentTime();
timeEnd =
timePassed = COleDateTime::GetCurrentTime( ) - timeStart;
daysLeft = 30 - static_cast< int >( timePassed.GetTotalDays( ) );
CString strMessage;
if( daysLeft > 0 )
{ strMessage.Format( "ADDapt was not activated within 30 days of " "installation and is currently not functional.\n" "To activate please call Avtron Field Service at 216-642-1230 " "ext 1214.\n" "The 30 days trial period starts on the day you installed " "ADDapt.\n" "You have %d days left to renew ADDapt Software.", daysLeft );
}
Else
{
strMessage.Format(_T(“ADDapt is operating under a trial license. \n
_T(“You have %d” “ days to activate ADDapt with valid license, \n”)
_T(“To activate, Please call Avtron Field Service at 000-000-0000.”), daysLeft);
}
AfxMessageBox( strMessage );

Other code to register product is as follow:

BOOL gotTime= FALSE;
if(!gotTime)
{
if (ProductCode !+ OXeO)
else
//Code for time registration goes here
gotTime=TRUE

}

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