Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Disabling Screen Savers
Message
De
14/07/1998 08:45:07
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00117077
Message ID:
00117083
Vues:
17
>Can anyone tell me an easy way to programaticaly disable a screen saver? I have a form that is visible for about an hour while code is processing in the background, and the screen saver kicks in after 5 minutes. I only want to disable the screen saver when the form is not active. Thanks
Hi Mark,
It could be done via winapi I think but for simplicity I would click at regular intervals to stop screen saver :
* Process start
thisform.addobject("DummyShield","Shape") && Build a shield against subsequent
                                          && clicks on controls while in process
with thisform.DummyShield
   .left = 0
   .top = 0
   .height = thisform.height
   .width = thisform.width
   .backstyle = 0 && Transparent
   .borderstyle = 0 && Transparent
   .visible = .t.
endwith
Thisform.Timer1.enabled = .t.

* Process end
Thisform.removeobject("DummyShield")
Thisform.Timer1.enabled = .f.

* Timer1 .timer event
mouse click at thisform.top + 5, 50 pixels
A timer (timer1) added to form programmatically clicks at intervals less than screensaver kick in period ie: 59 secs. while in process.
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform