View previous topic :: View next topic |
Author |
Message |
Sputnik
Joined: 23 Apr 2007 Posts: 80
|
Posted: Tue Apr 24, 2007 12:48 am Post subject: How can I put the # of Trial days in one of my forms? |
|
|
the subject pretty much says it - I want to put something like the popup does (You are on Day x of the 25 day trial) in the About box and the splash form.
Secondly - if there is there a way to do this, how can I skip the popup that gets generated? |
|
Back to top |
|
|
Infralution
Joined: 28 Feb 2005 Posts: 5027
|
Posted: Tue Apr 24, 2007 3:12 am Post subject: |
|
|
The code that generates the trial message for the sample project is just in the OnLoad event eg
Code: | ' use the EvaluationMonitor class to check whether the evaluation has expired
'
Dim monitor As New EvaluationMonitor("MyProductSecretName")
If monitor.DaysInUse > 30 Or monitor.Invalid Then
MessageBox.Show("Your evaluation has expired")
Application.Exit()
Else
MessageBox.Show(String.Format("You are on day {0} of your 30 day evaluation", monitor.DaysInUse))
End If |
If you want to put this in the splash screen you can simply move this code into the spash screen OnLoad and instead of calling MessageBox.Show you want set the text of a label on your splash screen. _________________ Infralution Support |
|
Back to top |
|
|
|