Imports Microsoft.Win32
Dim dteRegLock As DateTime = "2015/12/15"
Dim strRegName As String = "ArtisCalcBeta"
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
If DemoVersion() = False Then
Me.Opacity = 0
Me.ShowInTaskbar = False
Timer1.Enabled = True
End If
End Sub
Private Function DemoVersion() As Boolean
Dim regKey As RegistryKey
regKey = Registry.LocalMachine.OpenSubKey("SOFTWARE\\SmallGCOk", True)
Dim strKey As String = regKey.GetValue(strRegName)
If strKey = "" Then
regKey.SetValue(strRegName, Date.Today.ToString("yyyy/MM/dd"))
Else
Dim dteTemp As Date
Try
dteTemp = Date.Parse(strKey)
If (dteTemp.DayOfYear + 30) < Date.Today.DayOfYear Or Date.Today > dteRegLock Then
MsgBox("試用期已過期,請聯絡SmallGCOk,購買正版", 16, "錯誤")
Return False
End If
Catch ex As Exception
End Try
End If
Return True
End Function
Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
End
End Sub
沒有留言:
張貼留言