Any help would be greatly appreciated
Detect Screen Saver?
Detect Screen Saver?
Is there any code that can let you detect when the screen saver appears? Ive searched the WinAPI and MSDN, but I can not find anything such as WM_SCREENSAVE.
Any help would be greatly appreciated
Any help would be greatly appreciated
PB 3.94
Checks if workstation is locked (this part of the code is a hack, but there is NO "official" way to detect a locked machine) or if blanker is on (this part works only for w2k or "better"):
Code: Select all
Procedure.b CheckBlankerOrLock()
;Check if Desktop active, else it's locked or switched
If (GetForegroundWindow_() = 0) : ProcedureReturn #True : EndIf
;Check screensaver
SystemParametersInfo_(#SPI_GETSCREENSAVERRUNNING, 0, @SSaverIsActive.l, 0)
If (SSaverIsActive = #True) : ProcedureReturn #True : EndIf ;screensaver is running
ProcedureReturn #False
EndProcedure

