Results 1 to 8 of 8

Thread: How to destruct the program after a certain date?

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Feb 2008
    Location
    San Diego, CA
    Posts
    19

    How to destruct the program after a certain date?

    I need to send out a calculation program to my colleagues for evaluation and get feedback. I just want this program to work until Friday of this week. How can I do this?

    Thanks,

    Nina

  2. #2
    Lively Member
    Join Date
    Aug 2007
    Posts
    107

    Re: How to destruct the program after a certain date?

    couldnt u do something on the Form load.
    i guess u would use date.Now
    so something like

    If date.now = thedate Then
    Me.Close
    End If

    idk, just guessing
    Bleep Bloop

  3. #3

    Thread Starter
    Junior Member
    Join Date
    Feb 2008
    Location
    San Diego, CA
    Posts
    19

    Re: How to destruct the program after a certain date?

    If 'thedate' is February 29, 2008 then do I write it like this?

    Code:
    If date.now = 02/29/2008 Then
    Me.Close
    End If
    Quote Originally Posted by MrMakealotofsmoke
    couldnt u do something on the Form load.
    i guess u would use date.Now
    so something like

    If date.now = thedate Then
    Me.Close
    End If

    idk, just guessing

  4. #4
    Frenzied Member obi1kenobi's Avatar
    Join Date
    Aug 2007
    Posts
    1,091

    Re: How to destruct the program after a certain date?

    Quote Originally Posted by MrMakealotofsmoke
    couldnt u do something on the Form load.
    i guess u would use date.Now
    so something like

    If date.now = thedate Then
    Me.Close
    End If

    idk, just guessing
    But this way, they only need to change the system date and the app will work once again.

    Quote Originally Posted by nina_le_huynh
    If 'thedate' is February 29, 2008 then do I write it like this?

    Code:
    If date.now = 02/29/2008 Then
    Me.Close
    End If
    No, you wouldn't write it like that. Try this:

    vb.net Code:
    1. Dim d As New Date(2008, 2, 29)
    Last edited by obi1kenobi; Feb 24th, 2008 at 04:07 AM.

  5. #5

    Thread Starter
    Junior Member
    Join Date
    Feb 2008
    Location
    San Diego, CA
    Posts
    19

    Re: How to destruct the program after a certain date?

    It should be ok because my colleagues wouldn't change the system date to bypass the restriction. I just want them to use the revised version.

    I just tried to use 'thedate' as 02/29/2008 but it doesn't work.

    Quote Originally Posted by obi1kenobi
    But this way, they only need to change the system date and the app will work once again.

  6. #6

    Thread Starter
    Junior Member
    Join Date
    Feb 2008
    Location
    San Diego, CA
    Posts
    19

    Re: How to destruct the program after a certain date?

    It worked,

    I put this into the FormLoad and I couldn't open my program.

    Code:
            Dim thedate As New Date(2008, 2, 20)
    
            If Date.Now > thedate Then
                Me.Close()
            End If
    Thank you very much, you saved me lots of time.

    Quote Originally Posted by obi1kenobi
    But this way, they only need to change the system date and the app will work once again.



    No, you wouldn't write it like that. Try this:

    vb.net Code:
    1. Dim d As New Date(2008, 2, 29)

  7. #7
    Frenzied Member obi1kenobi's Avatar
    Join Date
    Aug 2007
    Posts
    1,091

    Re: How to destruct the program after a certain date?

    You're welcome, just please don't forget to rate my posts if I've been helpful. Thanks

  8. #8
    Lively Member
    Join Date
    Aug 2007
    Posts
    107

    Re: How to destruct the program after a certain date?

    yer same :P
    Bleep Bloop

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