-
closing and opening a program every 30 minutes
Hi There:
I need to close a program running in my vb application and open it again
after 30 minutes. This process keeps going until needed. i.e one program
calls other program every 30 minutes.
Any help about coding is appreciated.
Thanks in advance.
Shailesh
-
Re: closing and opening a program every 30 minutes
Shailesh:
Some months ago I wrote a tip of the month that I call 'Use Function
'DoneRecently' to Schedule '. Link to http://www.buygold.net/tips then look
for the October 2001 tip of the month. A sample program is provided. From
the tip intro:
A common news group question goes something like:
The VB timer's interval is limited to about one second (65,535
milliseconds). How do I run an application that wakes up twice a day to
perform a scheduled function?
Last year I wrote a function I call 'DoneRecently' which uses a duration
and a last done time. It returns True only when the last done date/time plus
the duration is greater than the current time. You could use this function
to write a routine that 'wakes-up' every so often and performs some
scheduled task. So the function 'DoneRecently' becomes the tip-of-the-month.
Cheers,
Larry Rebich
More tips link to:
http://www.buygold.net/tips
Please:
No personal e-mail questions :-)
"Shailesh Patel" <shailesh@urnerbarry.com> wrote in message
news:3c0e1ec8$1@147.208.176.211...
> Hi There:
> I need to close a program running in my vb application and open it again
> after 30 minutes. This process keeps going until needed. i.e one program
> calls other program every 30 minutes.
> Any help about coding is appreciated.
>
> Thanks in advance.
> Shailesh
>
>
-
Re: closing and opening a program every 30 minutes
Shailesh:
Some months ago I wrote a tip of the month that I call 'Use Function
'DoneRecently' to Schedule '. Link to http://www.buygold.net/tips then look
for the October 2001 tip of the month. A sample program is provided. From
the tip intro:
A common news group question goes something like:
The VB timer's interval is limited to about one second (65,535
milliseconds). How do I run an application that wakes up twice a day to
perform a scheduled function?
Last year I wrote a function I call 'DoneRecently' which uses a duration
and a last done time. It returns True only when the last done date/time plus
the duration is greater than the current time. You could use this function
to write a routine that 'wakes-up' every so often and performs some
scheduled task. So the function 'DoneRecently' becomes the tip-of-the-month.
Cheers,
Larry Rebich
More tips link to:
http://www.buygold.net/tips
Please:
No personal e-mail questions :-)
"Shailesh Patel" <shailesh@urnerbarry.com> wrote in message
news:3c0e1ec8$1@147.208.176.211...
> Hi There:
> I need to close a program running in my vb application and open it again
> after 30 minutes. This process keeps going until needed. i.e one program
> calls other program every 30 minutes.
> Any help about coding is appreciated.
>
> Thanks in advance.
> Shailesh
>
>
-
Re: closing and opening a program every 30 minutes
Hello Shailesh
You could use the TIME control and set it to 30 minutes, I think you know
what I am talking about, if you need details, call..
Adan Adnan
"Shailesh Patel" <shailesh@urnerbarry.com> wrote:
>Hi There:
>I need to close a program running in my vb application and open it again
>after 30 minutes. This process keeps going until needed. i.e one program
>calls other program every 30 minutes.
>Any help about coding is appreciated.
>
>Thanks in advance.
>Shailesh
>
>
-
Re: closing and opening a program every 30 minutes
Hello Shailesh
You could use the TIME control and set it to 30 minutes, I think you know
what I am talking about, if you need details, call..
Adan Adnan
"Shailesh Patel" <shailesh@urnerbarry.com> wrote:
>Hi There:
>I need to close a program running in my vb application and open it again
>after 30 minutes. This process keeps going until needed. i.e one program
>calls other program every 30 minutes.
>Any help about coding is appreciated.
>
>Thanks in advance.
>Shailesh
>
>
-
Re: closing and opening a program every 30 minutes
Time control?
Please let me know the detail? i am not sure what a Time control is? is it
like our very own timer?
--
Warm Regards
Santosh D. Singh
santoshdsingh@yahoo.com
santoshdsingh@hotmail.com
If you aim at nothing, you will hit it everytime.
"Adan" <safoh@uruklink.net> wrote in message
news:3c0f1bd0$1@147.208.176.211...
>
> Hello Shailesh
> You could use the TIME control and set it to 30 minutes, I think you know
> what I am talking about, if you need details, call..
>
> Adan Adnan
> "Shailesh Patel" <shailesh@urnerbarry.com> wrote:
> >Hi There:
> >I need to close a program running in my vb application and open it again
> >after 30 minutes. This process keeps going until needed. i.e one program
> >calls other program every 30 minutes.
> >Any help about coding is appreciated.
> >
> >Thanks in advance.
> >Shailesh
> >
> >
>
>
-
Re: closing and opening a program every 30 minutes
Time control?
Please let me know the detail? i am not sure what a Time control is? is it
like our very own timer?
--
Warm Regards
Santosh D. Singh
santoshdsingh@yahoo.com
santoshdsingh@hotmail.com
If you aim at nothing, you will hit it everytime.
"Adan" <safoh@uruklink.net> wrote in message
news:3c0f1bd0$1@147.208.176.211...
>
> Hello Shailesh
> You could use the TIME control and set it to 30 minutes, I think you know
> what I am talking about, if you need details, call..
>
> Adan Adnan
> "Shailesh Patel" <shailesh@urnerbarry.com> wrote:
> >Hi There:
> >I need to close a program running in my vb application and open it again
> >after 30 minutes. This process keeps going until needed. i.e one program
> >calls other program every 30 minutes.
> >Any help about coding is appreciated.
> >
> >Thanks in advance.
> >Shailesh
> >
> >
>
>
-
Re: closing and opening a program every 30 minutes
Hi Shailesh,
There are lots of ways to extend the limitation of 65 secs of the Timer control.
This is a sample showing how to increase the limitations of the Timer control.
This way you multiply Timer1.Intervall by the value of z.
Private Sub Timer1_Timer()
Static z As Integer
If z >= 10 Then
'Put your timer event code here...
Call MyExtendedTimerJustFired()
z = 0
Else
z = z + 1
End If
End Sub
Here's another sample for doing something once a day;
Private Sub Timer1_Timer()
'Timer1.Interval can be set to anything (as high as possible)...
'TrigNext is module level Date type preset to a date and time...
If TrigNext <= Now() Then
'Add another day to TrigNext
TrigNext = DateAdd("d", 1, TrigNext)
'Put your timer event code here...
Call MyDailyTimerJustFired()
End If
End Sub
Regards
Bernie
"Shailesh Patel" <shailesh@urnerbarry.com> wrote:
>Hi There:
>I need to close a program running in my vb application and open it again
>after 30 minutes. This process keeps going until needed. i.e one program
>calls other program every 30 minutes.
>Any help about coding is appreciated.
>
>Thanks in advance.
>Shailesh
>
>
-
Re: closing and opening a program every 30 minutes
Hi Shailesh,
There are lots of ways to extend the limitation of 65 secs of the Timer control.
This is a sample showing how to increase the limitations of the Timer control.
This way you multiply Timer1.Intervall by the value of z.
Private Sub Timer1_Timer()
Static z As Integer
If z >= 10 Then
'Put your timer event code here...
Call MyExtendedTimerJustFired()
z = 0
Else
z = z + 1
End If
End Sub
Here's another sample for doing something once a day;
Private Sub Timer1_Timer()
'Timer1.Interval can be set to anything (as high as possible)...
'TrigNext is module level Date type preset to a date and time...
If TrigNext <= Now() Then
'Add another day to TrigNext
TrigNext = DateAdd("d", 1, TrigNext)
'Put your timer event code here...
Call MyDailyTimerJustFired()
End If
End Sub
Regards
Bernie
"Shailesh Patel" <shailesh@urnerbarry.com> wrote:
>Hi There:
>I need to close a program running in my vb application and open it again
>after 30 minutes. This process keeps going until needed. i.e one program
>calls other program every 30 minutes.
>Any help about coding is appreciated.
>
>Thanks in advance.
>Shailesh
>
>
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
|
Development Centers
-- Android Development Center
-- Cloud Development Project Center
-- HTML5 Development Center
-- Windows Mobile Development Center
|