|
-
Feb 24th, 2008, 03:34 AM
#1
Thread Starter
Junior Member
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
-
Feb 24th, 2008, 03:52 AM
#2
Lively Member
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
-
Feb 24th, 2008, 04:03 AM
#3
Thread Starter
Junior Member
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
 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
-
Feb 24th, 2008, 04:04 AM
#4
Frenzied Member
Re: How to destruct the program after a certain date?
 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.
 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:
Dim d As New Date(2008, 2, 29)
Last edited by obi1kenobi; Feb 24th, 2008 at 04:07 AM.
-
Feb 24th, 2008, 04:07 AM
#5
Thread Starter
Junior Member
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.
 Originally Posted by obi1kenobi
But this way, they only need to change the system date and the app will work once again.
-
Feb 24th, 2008, 04:17 AM
#6
Thread Starter
Junior Member
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.
 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:
Dim d As New Date(2008, 2, 29)
-
Feb 24th, 2008, 05:27 AM
#7
Frenzied Member
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
-
Feb 24th, 2008, 06:45 AM
#8
Lively Member
Re: How to destruct the program after a certain date?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|