Results 1 to 22 of 22

Thread: VB6 application limited runing time???

Hybrid View

  1. #1
    PowerPoster RhinoBull's Avatar
    Join Date
    Mar 2004
    Location
    New Amsterdam
    Posts
    24,132

    Re: VB6 application limited runing time???

    There are many different ways including some "hidden" file, registry but general idea is that you need to write start date (it could also be encrypted) and check difference in days on every launch.
    I've seen commercial apps allowing 15 launches (not even days).

  2. #2
    Former Admin/Moderator MartinLiss's Avatar
    Join Date
    Sep 1999
    Location
    San Jose, CA
    Posts
    33,431

    Re: VB6 application limited runing time???

    You can also take the approach of distributing an app that only allows for limited functionality until the user registers. If you're interested in that approach then see the A program registration scheme link in my signature.

  3. #3

    Thread Starter
    Lively Member
    Join Date
    Aug 2007
    Posts
    82

    Re: VB6 application limited runing time???

    Quote Originally Posted by RhinoBull
    There are many different ways including some "hidden" file, registry but general idea is that you need to write start date (it could also be encrypted) and check difference in days on every launch.
    I've seen commercial apps allowing 15 launches (not even days).

    That ia a good idea, what is the VB6 code of that?

    Thank you

  4. #4

  5. #5

    Thread Starter
    Lively Member
    Join Date
    Aug 2007
    Posts
    82

    Re: VB6 application limited runing time???

    Quote Originally Posted by RhinoBull
    I don't suppose you don't know how to write to a file?
    You still did not show me What is the VB code of that 10 or 15 lunches, you do not need to suppose

  6. #6
    PowerPoster RhinoBull's Avatar
    Join Date
    Mar 2004
    Location
    New Amsterdam
    Posts
    24,132

    Re: VB6 application limited runing time???

    Wow... I wasn't planning doing that though - that is a very basic stuff.

    Anyway, you can have something a s simple as these few lines:
    Code:
    'NOTE: place this code to your startup form or Sub Main instead if you use that
    
    Private Sub Form_Load()
    Dim iCounter As Integer
    
        iCounter = CInt(GetSetting(App.EXEName, "trial", "count", 0))
        iCounter = iCounter + 1
        
        If iCounter < 16 Then
            SaveSetting App.EXEName, "trial", "count", iCounter
        Else
            MsgBox "The trial period is expired." & _
                   vbNewLine & _
                   "If you wish to continue to use this software you must purchase it."
            End
        End If
    
    End Sub

  7. #7

    Thread Starter
    Lively Member
    Join Date
    Aug 2007
    Posts
    82

    Re: VB6 application limited runing time???

    Quote Originally Posted by RhinoBull
    Wow... I wasn't planning doing that though - that is a very basic stuff.

    Anyway, you can have something a s simple as these few lines:
    Code:
    'NOTE: place this code to your startup form or Sub Main instead if you use that
    
    Private Sub Form_Load()
    Dim iCounter As Integer
    
        iCounter = CInt(GetSetting(App.EXEName, "trial", "count", 0))
        iCounter = iCounter + 1
        
        If iCounter < 16 Then
            SaveSetting App.EXEName, "trial", "count", iCounter
        Else
            MsgBox "The trial period is expired." & _
                   vbNewLine & _
                   "If you wish to continue to use this software you must purchase it."
            End
        End If
    
    End Sub
    Thank you for your reply, I will try your code and let you know.

    Wow

  8. #8

    Thread Starter
    Lively Member
    Join Date
    Aug 2007
    Posts
    82

    Resolved Re: VB6 application limited runing time???

    Yes! your code worked OK and thank you very much for your help.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width