How do I set an expiration date for my Visual Basic exe

I have a vb5 program that I would like to expire in 30 days of usage. Your help is appreciated.
davidgmAsked:
Who is Participating?
 
Éric MoreauConnect With a Mentor Senior .Net ConsultantCommented:
0
 
VBClassicGuyCommented:
Put this in your Form_Load event:
Dim txt As String
txt = GetSetting(UCase$(App.EXEName), "License", "StartDatim")
If Len(txt$) Then
     If DateDiff("d", Cdate(txt), Now) > 30 Then
          Call DeleteSetting(UCase$(App.EXEName), "License")
          End     'you can replace this with a MsgBox and then provide limited functionality, etc.
     End If
Else
     Call SaveSetting(UCase$(App.EXEName), "License", "StartDatim", Now)
End If
0
All Courses

From novice to tech pro — start learning today.