Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Disabling a screen saver
Message
 
À
24/04/1998 14:48:00
Ray Watson
A Certified Electronics Co
Knoxville, Tennessie, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00093980
Message ID:
00094752
Vues:
46
>One LAST note...fyi
>
>The code as discussed will not stop a running the screensaver if... imediately following the MOUSE DRAG code, from within a timer event, you use the MESSAGEBOX statement to display the message... you still need user interaction to stop the screensaver in order to see the message,
>
>HOWEVER, if you follow the MOUSE DRAG code with a DO FORM statement to display the message everything works great!
>
>Furthermore, you don't need any API calls at all...you only need MOUSE DRAG!
>(Thanks George)
>
>Thanks to all
>Ray

You're welcome, Ray. BTW, what may be causing this is that the dialog produced by the VFP MESSAGEBOX() function is actually just a hook into the API function of the same name. It should execute faster than a DO FORM, and may be happening so fast that the system doesn't recoginize the mouse movement. This is a wild guess.

I don't remember if we touch on this during the thread, but SystemParametersInfo() can return the length of time the system has to be idle in order for the screen saver to kick in. If you're still using a timer, you can use it to set the interval. Use:
#DEFINE SPI_GETSCREENSAVETIMEOUT   14
as the first parameter, using the same declaration and method you used to get whether or not the screen saver is active. The return value is in seconds.
George

Ubi caritas et amor, deus ibi est
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform