i can start the screensaver in my app.
but i was wondering how my app detects that the screensaver stops running?
please help.
Printable View
i can start the screensaver in my app.
but i was wondering how my app detects that the screensaver stops running?
please help.
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.
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?
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:
Quote:
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.