Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Any know how to use George Tasker's Scrnsave task
Message
From
20/07/2004 11:56:21
 
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
00925785
Message ID:
00926141
Views:
13
>Steve
>
>This is my startup program
>
>clear
>set talk off
>set exact on
>SET PROCEDURE TO ScrnSave ADDITIVE
>oSaver = CREATEOBJECT('ScreenSaver')
>oSaver.disableScreenSaver
>RELEASE PROCEDURE ScrnSave
>
>I build a project and create an executable and run it
>
>Colin

I was curious as to what code comes *after* this code, but I assume that you run a form or menu and have a READ EVENTS. In which case, this should work fine.

An example of it going out of scope would be something like below. Or, if you used RUN /N to run another .exe, and your current .exe would cease to exist.
* main program
clear
set talk off
set exact on
disableScreenSaver()

do form ....
read events

return

procedure disableScreenSaver
   oSaver = newobject('ScreenSaver','scrnsave.prg')
   oSaver.disableScreenSaver
   * oSaver will go away now, and the screen saver will be enabled again...
endproc
Steve Gibson
Previous
Reply
Map
View

Click here to load this message in the networking platform