/ Published in: VB.NET
Created by Brandon
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
Public Class Form1 Public day As String 'Creates all the variables Public month As String Public year As String Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load day = My.Computer.Clock.LocalTime.Day 'Declares day,month,and year as the current Day Month and Year month = My.Computer.Clock.LocalTime.Month year = My.Computer.Clock.LocalTime.Year If My.Settings.checked = False Then 'Checks if this is the first time the program has run, if it is, save the current date into a setting. My.Settings.day = day My.Settings.month = month My.Settings.year = year My.Settings.checked = True Else Try If year = My.Settings.year Then 'If the year is the same, check the month If month = My.Settings.month Then Else 'If the month is not the same then check if the day is If month = My.Settings.month + 1 Then If day = My.Settings.day Then Else 'If the day is bigger than the current day, the trial is expired If day > My.Settings.day Then End If End If Else If month = My.Settings.month + 2 Then Else If month <> My.Settings.month + 1 Then End If End If End If End If Else 'If the year is different, the trial has expired End If 'If there is an error, make a msgbox containing the error Catch ex As Exception End Try End If End Sub End Class