Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Visual Basic
  4. licensing in vb.net

licensing in vb.net

Scheduled Pinned Locked Moved Visual Basic
csharphelp
3 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    MissionSuccess
    wrote on last edited by
    #1

    hai as i m new to vb.net anyone plz tell me the concept of licensing in vb.net can anyone plz send me the code of licensing in vb.net. how i can issue a license of 30 days for my application. its very very urgent thank you

    K D 2 Replies Last reply
    0
    • M MissionSuccess

      hai as i m new to vb.net anyone plz tell me the concept of licensing in vb.net can anyone plz send me the code of licensing in vb.net. how i can issue a license of 30 days for my application. its very very urgent thank you

      K Offline
      K Offline
      Kschuler
      wrote on last edited by
      #2

      One option would be to store the date the application was installed/should expire in the registry either during installation or the first time the user runs the app. Then insert code to check that registry value. In Visual Studio 2005 you can do this check in the ApplicationEvents.vb MyApplication_Startup Event. Like this:

      Private Sub MyApplication_Startup(ByVal sender As Object, ByVal e As Microsoft.VisualBasic.ApplicationServices.StartupEventArgs) Handles Me.Startup
      'If the current date is greater than or equal to the Expiration date, then the program will not open.
      If CInt(Now.Date.ToString("yyyyMMdd")) >= gblintExpireDate Then
      MessageBox.Show(My.Application.Info.ProductName & " has expired.", My.Application.Info.ProductName)
      e.Cancel = True
      End If
      End Sub

      (Of course the gblintExpireDate would have to be a value from the registry instead of a global constant like I use) Or for other versions of Visual Studio I suppose you can do this check in the OnLoad of the first form or in your main sub... Hope this helps.

      1 Reply Last reply
      0
      • M MissionSuccess

        hai as i m new to vb.net anyone plz tell me the concept of licensing in vb.net can anyone plz send me the code of licensing in vb.net. how i can issue a license of 30 days for my application. its very very urgent thank you

        D Offline
        D Offline
        DJLarZ
        wrote on last edited by
        #3

        You could (instead of licensing) write the date when the program was installed to a key in the registry, and if the program is started when more than 30 days have gone by, the program won't start. ---- Dim Sleepy as Boolean = True If Me.Sleepy = True Then Goto Sleep End If ----

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups