我用下面代码实现时间限制,但过了两天使用期、程序重新安装后仍然提示已过使用时间,不知为何?请各位高手指点,最好能给出解决办法,我是初学者,十分感谢!代码如下:
Dim retvalue As Date
Dim days As Integer
days = 2
retvalue = GetSetting(App.Title, "mainkey", "datevalue", Date)
If retvalue = Date Then
SaveSetting App.Title, "mainkey", "datevalue", Date
ElseIf Date - retvalue + days > days Then
MsgBox "本软件的使用期已过" & days & "天,抱歉请退出!"
End
End If
If days - (Date - retvalue) - days > days Then
MsgBox "你修改了系统日期就不许使用本软件,抱歉请退出!"
End
Else
MsgBox "本软件只有" & days & "天的使用期!" & vbCrLf & "你还剩下" & days - (Date - retvalue) - days & "天试用期!"
End If
Dim retvalue As Date
Dim days As Integer
days = 2
retvalue = GetSetting(App.Title, "mainkey", "datevalue", Date)
If retvalue = Date Then
SaveSetting App.Title, "mainkey", "datevalue", Date
ElseIf Date - retvalue + days > days Then
MsgBox "本软件的使用期已过" & days & "天,抱歉请退出!"
End
End If
If days - (Date - retvalue) - days > days Then
MsgBox "你修改了系统日期就不许使用本软件,抱歉请退出!"
End
Else
MsgBox "本软件只有" & days & "天的使用期!" & vbCrLf & "你还剩下" & days - (Date - retvalue) - days & "天试用期!"
End If
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货