` Checking for screensaver - API call (Stephen Bottomley ) - Icetips Article
Icetips - Templates, Tools & Utilities for Clarion Developers

Templates, Tools and Utilities
for Clarion Developers

Icetips Article

Back to article list   Search Articles     Add Comment     Printer friendly     Direct link  

Par2: Checking for screensaver - API call
1998-04-26 -- Stephen Bottomley
 
This asumes 32bit SystemParametersInfo(UNSIGNED,UNSIGNED,PVOID,UNSIGNED),BOOL,PASCAL, RAW,NAME('SystemParametersInfoA') SPI_GETSCREENSAVEACTIVE EQUATE(16) SPI_SETSCREENSAVEACTIVE EQUATE(17) SPIF_SENDWININICHANGE EQUATE(0002h) IsActive BOOL To detect if the screen saver is enabled, use this: SystemParametersInfo( SPI_GETSCREENSAVEACTIVE,0,ADDRESS(IsActive),0) On return, the variable IsActive will be TRUE if the screen saver setting is enabled in the System control panel applet and FALSE if the screen saver setting is not enabled. To disable the screen saver setting, call SystemParametersInfo() with this: SystemParametersInfo(SPI_SETSCREENSAVEACTIVE,FALSE,0,SPIF_SENDWININICHANGE)


Today is April 26, 2024, 4:45 am
This article has been viewed 35108 times.



Back to article list   Search Articles   Add Comment   Printer friendly

Login

User Name:

Password: