Results 1 to 4 of 4

Thread: how can my app detect that the screenssaver stops running

  1. #1

    Thread Starter
    Addicted Member c@lle's Avatar
    Join Date
    Oct 1999
    Location
    Belgium
    Posts
    179

    how can my app detect that the screenssaver stops running

    i can start the screensaver in my app.
    but i was wondering how my app detects that the screensaver stops running?

    please help.

  2. #2
    PowerPoster
    Join Date
    Aug 2000
    Location
    India
    Posts
    2,288
    I am confused by your question. Your screensaver is a normal app of VB.
    The form that you are using for your screensaver will generate its
    Form_UnLoad event(and all other related events) when the screensaver is terminated.

  3. #3

    Thread Starter
    Addicted Member c@lle's Avatar
    Join Date
    Oct 1999
    Location
    Belgium
    Posts
    179
    my app has nothing to do with the screensaver.
    i'm running my app, then after a time i force the standard screensaver to start.

    Now i want my program to restart when the screensaver is stopped.
    how can i do that, how can i detect this?

  4. #4
    PowerPoster
    Join Date
    Aug 2000
    Location
    India
    Posts
    2,288
    Your application needs to be running to determine whether the
    screenasver has terminated or not.
    In a timer, call the SystemParametersInfo with the following constant
    Const SPI_GETSCREENSAVEACTIVE = 16

    From MSDN:
    Windows 98, Windows 2000: Determines whether a screen saver is currently running on the window station of the calling process. The pvParam parameter must point to a BOOL variable that receives TRUE if a screen saver is currently running, or FALSE otherwise.

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