Private Function GetNSetTimes() As Boolean
'時間限制
Dim RemainDay As Long
RemainDay = GetSetting("frmLogin", "set", "day", 0)
If RemainDay = 30 Then
MsgBox("30天試用期已過,請購買全功能版……")
Application.Exit()
Return False
Else
MsgBox("你現在試用的是試用版本,現在還剩下:" & 30 - RemainDay & "天,好好珍惜!")
If Date.Now.Day - RemainDay > 0 Then
RemainDay = RemainDay + 1
SaveSetting("frmLogin", "set", "day", RemainDay)
Return True
End If
End If
End Function
Private Sub 次數限制_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
'次數限制
Dim RemainDay As Long
RemainDay = GetSetting("MyApp", "set", "times", 0)
If RemainDay = 30 Then
MsgBox("?用次?已?,?……")
Application.Exit()
End If
MsgBox("現在剩下:" & 30 - RemainDay & "用次?,好好珍惜!")
RemainDay = RemainDay + 1
SaveSetting("MyApp", "set", "times", RemainDay)
End Sub
'時間限制
Dim RemainDay As Long
RemainDay = GetSetting("frmLogin", "set", "day", 0)
If RemainDay = 30 Then
MsgBox("30天試用期已過,請購買全功能版……")
Application.Exit()
Return False
Else
MsgBox("你現在試用的是試用版本,現在還剩下:" & 30 - RemainDay & "天,好好珍惜!")
If Date.Now.Day - RemainDay > 0 Then
RemainDay = RemainDay + 1
SaveSetting("frmLogin", "set", "day", RemainDay)
Return True
End If
End If
End Function
Private Sub 次數限制_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
'次數限制
Dim RemainDay As Long
RemainDay = GetSetting("MyApp", "set", "times", 0)
If RemainDay = 30 Then
MsgBox("?用次?已?,?……")
Application.Exit()
End If
MsgBox("現在剩下:" & 30 - RemainDay & "用次?,好好珍惜!")
RemainDay = RemainDay + 1
SaveSetting("MyApp", "set", "times", RemainDay)
End Sub