트라이얼버젼 제작
*
Public Class Form1

Private Sub Form1_Load(sender As Object, e As EventArgs)
If My.Settings.trialactive = True Then
Checkdate()

End If
If My.Settings.trialused = True Then
Button1.Enabled = False
End If
'my.settings.reset()
End Sub

Private Sub Button1_Click(sender As Object, e As EventArgs)
My.Settings.TrialActive = True
My.Settings.StartDate = Date.Today
My.Settings.TrialUsed = False
My.Settings.Save()
MsgBox("Your free 14 days Trial Has Begin !", MsgBoxStyle.Information, "Trial")
End Sub
Private Sub Checkdate()
Dim dt As Date = My.Settings.StartDate
Dim days As Double = (Date.Now.AddDays(-14).Subtract(dt)).TotalDays
If days <= 0 Then
My.Settings.TrialActive = True
My.Settings.Save()
MsgBox("u can use ur trial")
Else
My.Settings.TrialActive = False
My.Settings.TrialUsed = True
My.Settings.Save()
MsgBox("ur trial has been expired", MsgBoxStyle.Information)
End If
End Sub

Private Sub Form1_Load_1(sender As Object, e As EventArgs) Handles MyBase.Load
If My.Settings.TrialActive = True Then
Checkdate()
End If
If My.Settings.TrialUsed = True Then
Button1.Enabled = False
End If
End Sub
End Class
새로운 것

이 게시물을

공유하기

SEARCH

MENU NAVIGATION