| Description:Expiredate, it's very usefull for makers of shareware. It can work for the 30 days or 60 days you make this new demo for. After expiredate your programme will not work until customer pay to you. By: Edward Tie Inputs:None Returns:None Assumes:None Side Effects:None ' Expiredate(tm) 1.0 for freeware. It's usefull for makers of a kind of demo and shareware. ' Expire day, month, year , total day ' If you will make 30-day trial software then you can put total day ' Example: day1,month1,year1, 30 Option Explicit Dim day1 As Integer Dim month1 As Integer Dim basis As Long Dim schrikbasis As Long Dim e As Long Dim year1 As Long Dim moncode As Integer Dim ff As Integer Private Sub Form_Load() month1 = Month(Date) year1 = Year(Date) day1 = Day(Date) expiredate day1, month1, year1, 60 If Year(Date) >= year1 Then If Month(Date) >= month1 Then If Day(Date) > day1 Then _ MsgBox "Old version of Syscal has been expired!" Label1.Caption = Str(day1) + "-" + Str(month1) + "-" + Str(Year(Date)) End Sub Sub expiredate(day1 As Integer, month1 As Integer, year1 As Long, expireday As Integer) day1 = day1 + expireday start: moncode = 1 For ff = 1 To 7 If month1 = moncode Then If day1 > 31 Then day1 = day1 - 31 month1 = month1 + 1 If month1 = 12 Then year1 = year1 + 1: GoTo eind Else GoTo eind End If Else GoTo eind1 End If End If If moncode = 1 Then moncode = 3: GoTo st1 If moncode = 7 Then moncode = 8: GoTo st1 moncode = moncode + 2 st1: Next ff moncode = 4 ff = 0 For ff = 1 To 5 If month1 = moncode Then If day1 > 30 Then day1 = day1 - 30 month1 = month1 + 1 GoTo eind1 Else: GoTo eind End If End If If moncode = 6 Then moncode = 9: GoTo st2 moncode = moncode + 2 st2: Next ff basis = 1980 schrikbasis = 2000 For e = 1 To 32000 If year1 = schrikbasis Then GoTo gewoon If basis = schrikbasis Then schrikbasis = schrikbasis + 400 If year1 = basis Then If Month(Date) = 2 Then If day1 > 29 Then day1 = day1 - 29: _ month1 = month1 + 1: GoTo eind basis = basis + 4 Next gewoon: If month1 = 2 Then If day1 > 28 Then day1 = day1 - 28 month1 = month1 + 1 End If Else GoTo eind1 End If eind: GoTo start eind1: End Sub |
Expiredate |
India web developer web development India | Freelance web development ecommerce web developer | Prayagasoft - web designer India, Ecommerce developer india, Ecommerce design