Click here to Skip to main content
15,898,020 members
Please Sign up or sign in to vote.
1.00/5 (3 votes)
See more:
I m make a Trial version app Some Problem

I Use This code vb.net

VB
Public Class Trial

    Private Sub Trial_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        If My.Settings.Reg = False Then

        End If

        If My.Settings.Reg = True Then
            ' Login.Show()
            'Me.Close()
        End If
        Label3.Text = Date.Now.Date.ToString
        If My.Settings.Exdate = Nothing Then
            My.Settings.Exdate = DateTime.Now.AddDays(30)
        End If
        Label4.Text = My.Settings.Exdate.Date
    End Sub

    Public Sub ResfreshTime()
        Label3.Text = DateTime.Now.Date.ToString

    End Sub

    Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick

        ResfreshTime()
 
        If DateTime.Now <> My.Settings.Exdate Then
            Label5.Text = "Your Trial Period Has Expired"
            Button1.Enabled = False
            Timer1.Stop()

        End If

    End Sub

    Private Sub Button1_Click_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click

            Login.Show()
            Me.Close()


    End Sub

    Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click

        Dim Serial As String
        Serial = InputBox("Enter Your Protuct Key", "Activate The License", 1234, , )
        If Serial = "1234" Then
            My.Settings.Save()
            My.Settings.Reg = True

            Login.Show()
            Me.Close()
        Else
            MsgBox("Product Key Is Not Valid")


        End If
    End Sub
End Class


When I change my computer date 30++ Day This Trial Version Ok then
Exm.. 11-6-2015 to 11-7-2015 Trial
Change 12-7-2015 Show "Your Trial Period Has Expired" then
When 11-6-2015 Show app ok
I want to <> DateTime.Now Show "Your Trial Period Has Expired"
When Product Key Is Valid
show label 29,28,27 etc.........Chang Date

Any body Help me........ This Problem Salved

or

How to make a Strong Trial Version VB.NET, or C# Or Java
Posted
Updated 10-Jun-15 9:50am
v2
Comments
Afzaal Ahmad Zeeshan 10-Jun-15 15:34pm    
That logic depends on you how you want to make your software strong. Also, you are trying to use C# or VB.NET (that would work for .NET framework) and then Java (that requires JVM). Are you sure you want to continue?
MrteR 26-Jun-15 10:24am    
Take a look at this site , which I have used and works well! Maybe you can use this .

https://code.msdn.microsoft.com/windowsdesktop/My-Trial-Version-App-Dll-efb6a9b3

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900