Private Sub Form_Load()
Dim ss As Date
Dim dd As Integer
If GetSetting(appname:="this", section:="user", Key:="time") = "" Then
MsgBox "尊敬的用户:您好!您还没有注册软件,从现在开始,你的试用期为30天!"
SaveSetting appname:="this", section:="user", Key:="time", setting:=Date
Else
ss = GetSetting(appname:="this", section:="user", Key:="time")
dd = Date - ss
If dd > 30 Then
MsgBox "对不起,您的试用期已到!"
Unload Me
Else
MsgBox "您现在还没有注册软件,试用期还有" & 30 - dd & "天!"
End If
End If
End Sub