dcsimg


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 9 of 9

Thread: closing and opening a program every 30 minutes

  1. #1
    Shailesh Patel Guest

    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



  2. #2
    Larry Rebich Guest

    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
    >
    >




  3. #3
    Larry Rebich Guest

    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
    >
    >




  4. #4
    Adan Guest

    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
    >
    >




  5. #5
    Adan Guest

    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
    >
    >




  6. #6
    Santosh D. Singh Guest

    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
    > >
    > >

    >
    >




  7. #7
    Santosh D. Singh Guest

    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
    > >
    > >

    >
    >




  8. #8
    Bernie Guest

    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
    >
    >



  9. #9
    Bernie Guest

    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
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center