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. C#
  4. Creating trial version software

Creating trial version software

Scheduled Pinned Locked Moved C#
csharpquestionannouncement
6 Posts 4 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
    Milind Panchal
    wrote on last edited by
    #1

    I have develop one window application in C#.Net. I want to create a trial version for 15 Days. How can I do.

    V L 3 Replies Last reply
    0
    • M Milind Panchal

      I have develop one window application in C#.Net. I want to create a trial version for 15 Days. How can I do.

      V Offline
      V Offline
      venomation
      wrote on last edited by
      #2

      You can use preprocessors for example you could place this statement before your declare the namespaces: #define TRIAL using System..... ect and in the form load event you could: #if TRIAL if (firstusedate.days < firstusedate.days + 15) { MessageBox.Show("Sorry trial expired"); System.Thread.Sleep(3000); } #endif My answer is pretty vague but you should get the idea, feel free to ask if there is still some problems :)

      D 1 Reply Last reply
      0
      • M Milind Panchal

        I have develop one window application in C#.Net. I want to create a trial version for 15 Days. How can I do.

        L Offline
        L Offline
        Lost User
        wrote on last edited by
        #3

        First When U installed Your Software you must have to insert the Date any where either in Database or Text File or System Registry. When Person Start The Software Check That and +15 and Current Date Of System When Your Insert Date+15=CurrentDate The Close That Software or any Message trial Period of your Software is Over. Application.Exit(),Application.ExitThread(). Thanku Dinesh

        1 Reply Last reply
        0
        • V venomation

          You can use preprocessors for example you could place this statement before your declare the namespaces: #define TRIAL using System..... ect and in the form load event you could: #if TRIAL if (firstusedate.days < firstusedate.days + 15) { MessageBox.Show("Sorry trial expired"); System.Thread.Sleep(3000); } #endif My answer is pretty vague but you should get the idea, feel free to ask if there is still some problems :)

          D Offline
          D Offline
          Dave Kreskowiak
          wrote on last edited by
          #4

          I don't think anyone is going to get the idea because what you propose only does anything at compile time. It doesn't protect the app at all.

          A guide to posting questions on CodeProject[^]
          Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
               2006, 2007, 2008
          But no longer in 2009...

          V 1 Reply Last reply
          0
          • D Dave Kreskowiak

            I don't think anyone is going to get the idea because what you propose only does anything at compile time. It doesn't protect the app at all.

            A guide to posting questions on CodeProject[^]
            Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
                 2006, 2007, 2008
            But no longer in 2009...

            V Offline
            V Offline
            venomation
            wrote on last edited by
            #5

            I see the app is not being built as a trial, but a dynamic trial based app. ...

            1 Reply Last reply
            0
            • M Milind Panchal

              I have develop one window application in C#.Net. I want to create a trial version for 15 Days. How can I do.

              L Offline
              L Offline
              Lost User
              wrote on last edited by
              #6

              Just store the date of first use during install or first run of your app. Every time your app runs, read this value and check that X days have not elapsed. It can start to get complicated when you want to protect against date tampering, etc. Also take a look at CryptoLicensing - a ready-to-use system for this along with date tamper protection and more.

              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