软件试用期问题,在2000下可以用,在XP下却不可以,请大家帮帮忙
以下是代码:
Dim RetValue As Date
'通过GetSetting函数取得程序第一次运行的时间,如果注册表项中没有值,即将当天的日期返回
RetValue = GetSetting(App.Title, "mainkey", "datevalue", Date)
If RetValue = Date Then
'将程序第一次运行时间储存在注册表中?
SaveSetting App.Title, "MainKey", "DateValue", Date
ElseIf Date - RetValue > 90 Then
MsgBox ("软件的试用期已过,请注册!"), vbOKOnly, "提示"
Unload Me
ElseIf Date - RetValue = 1 Then
MsgBox ("您好!这是您第一次用本软件,欢迎使用,试用期为90天!还剩下" & 90 - (Date - RetValue) & "天试用期!"), vbOKOnly, "提示"
' frmLogin.Show
Else
MsgBox ("您好!还剩下" & 90 - (Date - RetValue) & "天试用期!过期请与本公司联系!"), vbOKOnly, "提示"
' frmLogin.Show
End If
问题是在2000系统下可以用,在XP下却不可以,请教一下,谢谢!!!