by neophile (1 Submission)
Category: Miscellaneous
Compatability: Visual Basic 5.0
Difficulty: Unknown Difficulty
Originally Published: Wed 19th January 2000
Date Added: Mon 8th February 2021
Rating:
(1 Votes)
Changes the system date to the day after the date of a specific file, starts and application, delays for a user-defined time (0-60s), then
API Declarations
'
' Text1 (TextBox) - Sec's to delay before resuming date
' Text2 (TextBox) - File to grab old date info from
' Text3 (TextBox) - Executable file to launch
' Command1 (CommandButton) - Do it!
'
' Note - This code contains absolutely _no_ error checking
' Use of this code exempts the author from it's
' illegal use by other parties. (That means you!)
Dim intSeconds As Integer ' Keeps track of passing seconds.
Private Sub Command1_Click() ' Do it!
dteCurrent = Date ' Grab current date
DateTime.Date = (FileDateTime(Text2.Text) + "1") ' Set system date to filedate
Timer1.Interval = 1000
intSeconds = 0
Shell Trim(Text3.Text), vbNormalFocus ' Launch the executable
Timer1.Enabled = True ' Start the timer
End Sub
Private Sub Timer1_Timer()
If intSeconds < Val(Text1.Text) Then
' Not done yet
intSeconds = intSeconds + 1
Timer1.Interval = 1000
Timer1.Enabled = True
Else
' Done waiting!
Timer1.Enabled = False ' Stop timer
DateTime.Date = CDate(dteCurrent) ' Resume current date
End If
End Sub
No comments have been posted about Changes the system date to the day after the date of a specific file, starts and application, delay. Why not be the first to post a comment about Changes the system date to the day after the date of a specific file, starts and application, delay.