shareware delay? Useful ???...

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • jamesd0142
    Contributor
    • Sep 2007
    • 471

    shareware delay? Useful ???...

    ------------------------------------
    ---Vb.net shareware delay example---
    ------------------------------------

    Allows the user to increase the time the program takes to load each time it is run. So you encourage people to buy the software, without being quite so

    intrusive, as to stop the program working completely after a set amount of days.

    [code=vbnet]
    Dim get1 As String
    Dim trial As String
    trial = GetSetting("del ay", "delay", "delay", "empty")
    If trial = "empty" Then
    SaveSetting("de lay", "delay", "delay", "10")
    Else
    get1 = GetSetting("del ay", "delay", "delay", "empty")
    Dim resave As String = CInt(get1) + 10
    DeleteSetting(" delay", "delay", "delay")
    SaveSetting("de lay", "delay", "delay", resave)

    'create delay (get1)
    Dim get2 As Integer = CInt(get1) * 1000
    Sleep(get2)
    End If
    [/code]
    NOTE: Imports System.threadin g.thread

    --------------------------------------------------------------------------------------------------------
    -Other options you could use are increasing the delay at a set amount every day, rather than every load-
    --------------------------------------------------------------------------------------------------------

    Comments welcome:
    Is it useful?
    Is it full of possible problems?

    James
  • kadghar
    Recognized Expert Top Contributor
    • Apr 2007
    • 1302

    #2
    Originally posted by jamesd0142
    ------------------------------------
    ---Vb.net shareware delay example---
    ------------------------------------

    Allows the user to increase the time the program takes to load each time it is run. So you encourage people to buy the software, without being quite so

    intrusive, as to stop the program working completely after a set amount of days.

    [code=vbnet]
    Dim get1 As String
    Dim trial As String
    trial = GetSetting("del ay", "delay", "delay", "empty")
    If trial = "empty" Then
    SaveSetting("de lay", "delay", "delay", "10")
    Else
    get1 = GetSetting("del ay", "delay", "delay", "empty")
    Dim resave As String = CInt(get1) + 10
    DeleteSetting(" delay", "delay", "delay")
    SaveSetting("de lay", "delay", "delay", resave)

    'create delay (get1)
    Dim get2 As Integer = CInt(get1) * 1000
    Sleep(get2)
    End If
    [/code]
    NOTE: Imports System.threadin g.thread

    --------------------------------------------------------------------------------------------------------
    -Other options you could use are increasing the delay at a set amount every day, rather than every load-
    --------------------------------------------------------------------------------------------------------

    Comments welcome:
    Is it useful?
    Is it full of possible problems?

    James
    of course it works, just make sure you use a different name for each app, and not that easy to guess. Cuz if you go, lets make it simple, to Excel's VBA and write savesetting("de lay","delay","d elay", "0"), your counter will be reset.

    i'd use some of the system's information, and pass it through some crazy encripting algorithm to generate the section or the key, or even the appname, if you dont want a deletesetting "delay" to screw it all.

    Anyway, it's quite simple and good enough for any "not that important" sofware.

    Comment

    Working...