Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Trial App + FTP & Source
#1
I got bored so i decided to do another.
The best are in my package that you can find Here

You will need a FTP host, i used GMX Get GMX Mail+FTP Here
But you can use your own if you like.

FTP TRIAL TUTORIAL

Click Project>Properties, and add this:
[Image: 13965551.png]
Form1: = 1 Button

Double click form1 so its form1_load and put
Code:
Dim tcode = Convert.ToString(My.Settings.activated)
        If (tcode = "1") Then
            Button1.Visible = False
        Else
            isittrial()
        End If

Now click button1 and put:
Code:
Dim theSecondForm As New Activate()
        theSecondForm.ShowDialog()

and also add this (not in the button)
Code:
Private Sub isittrial()
        Dim trialtime As Date = Now
        Dim currentdatetime As Date = Now
        trialtime = trialtime.AddDays(30) 'SET THIS TO HOWEVER MANY DAYS YOU WANT THE TRIAL TO RUN FOR
        Dim ttime = Convert.ToString(My.Settings.apptrial)
        If (ttime = "1") Then
            My.Settings.trialcode = trialtime
            My.Settings.apptrial = "0"
            My.Settings.Save()
        End If
        If (currentdatetime > trialtime) Then
            Dim theSecondForm As New Activate()
            theSecondForm.ShowDialog()
            Me.Close()
        End If
    End Sub

Part 2
Now add another form call Activate

You need:
2 textboxes
2 buttons

call button 1 Verify
call button 2 purchase

Now, at the top of all the code on the activate form place this at the top.

Code:
Imports System.Net
Imports System.IO

Now in button 1 paste this:

Code:
'GET SERIALS FROM SITE
        Try
            Dim url As String = "http://www.gmx.com/" + TextBox1.Text + ".act"
            Dim pageRequest As HttpWebRequest = CType(WebRequest.Create(url), HttpWebRequest)
            Dim pageResponse As WebResponse = pageRequest.GetResponse()
            Dim page As String = ""
            Using r As New StreamReader(pageResponse.GetResponseStream())
                page = r.ReadToEnd()
            End Using

            'END SERIALS
            If TextBox2.Text = page Then
                My.Computer.FileSystem.WriteAllText(Application.StartupPath + "\" + TextBox1.Text + ".act", "****KEY-USED****", True)
                My.Settings.trialcode = page
                My.Settings.activated = "1"
                My.Settings.Save()
                My.Computer.Network.UploadFile(Application.StartupPath + "\" + TextBox1.Text + ".act", "http://wwww.ftp.gmx.com/" + TextBox1.Text + ".act", "your@gmx.com", "your password", True, 10, FileIO.UICancelOption.DoNothing)
                If My.Computer.FileSystem.FileExists(Application.StartupPath + "\" + TextBox1.Text + ".act") Then
                    My.Computer.FileSystem.DeleteFile(Application.StartupPath + "\" + TextBox1.Text + ".act", FileIO.UIOption.OnlyErrorDialogs, FileIO.RecycleOption.DeletePermanently)
                End If
                MsgBox("ACTIVATION COMPLETE.  THANK YOU FOR YOUR SUPPORT.")
                Application.Restart()
            Else
                MsgBox("Invalid Key!")
                Me.Close()
            End If
        Catch ex As Exception
            MsgBox("Username not valid.  Please enter the correct username.")
        End Try


Now in button2 put:

Code:
System.Diagnostics.Process.Start("iexplore.exe", "http://www.paypal.com")

Now fill in your details for the button1.
And your good to go and test.

Or if you cant be assed to do it yourself...
Download SourceVictoire
Reply
#2
Cool. This can be useful.
30 chars.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  [VB.NET]Console app Menu example (amortization calculator)[Source] KoBE 8 7,535 12-28-2012, 06:55 AM
Last Post: mouse719
  [Visual Basic] FTP Uploader [Tutorial] Coding Support 6 2,703 08-12-2012, 12:36 AM
Last Post: Kenneth
  [Source ] Hemp Tycoon App [/Source] VB.net KoBE 8 9,316 03-05-2012, 10:30 PM
Last Post: SomeWhiteGuy?
  [Source]Sql Database Project [Source] Digital-Punk 0 1,342 10-16-2011, 07:01 AM
Last Post: Digital-Punk
  [Source]Batch to Exe converter[Source] Digital-Punk 6 2,618 10-15-2011, 03:00 AM
Last Post: Digital-Punk

Forum Jump:


Users browsing this thread: 1 Guest(s)