Monday 9 July 2012

Create 30 Days Trial Version with ProductKey Application

Create 30 Days Trial Version Windows Application With Product Key


Imports System.Windows.Forms

Public Class ProdVersoin
 

Private Sub ProdVersoin_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load

If My.Settings.Register = True Then
            MainMdi.Show()
            Me.Close()
        End If

        lblCurrentdate.Text = DateTime.Now

        If My.Settings.Exdate = Nothing Then
            My.Settings.Exdate = DateTime.Now.AddDays(30)
        Else

        End If
        lblExdate.Text = My.Settings.Exdate

 End Sub

Private Sub OK_Button_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles OK_Button.Click
 If TextBox1.Text = "123-456-789" Then
            My.Settings.Register = True
            MainMdi.Show()
            Me.Close()
        Else
            MsgBox("Wrong " + TextBox1.Text + " Activation Key, Retry..!!")
        End If

End Sub

Public Sub RefreshTime()
        lblCurrentdate.Text = DateTime.Now
End Sub

Private Sub Timer1_Tick(sender As System.Object, e As System.EventArgs) Handles Timer1.Tick
        RefreshTime()
        If DateTime.Now > My.Settings.Exdate Then
            lblError.Text = "Sorry, Your Product Has Expired. Enter Product Your " + vbNewLine + "Product Key for Register or get Full Version!!"

End If
End Sub

-This cede is basically tested. It will work..

0 comments:

Post a Comment