[DUG] Windows UI during Screensaver
John Bird
johnkbird at paradise.net.nz
Fri Aug 3 10:55:06 NZST 2007
So what is the best way to detect the screensaver is on? The best way I
know so far is
P:array[0..256] of Char;
Title:string;
ScreenSaverOn:Boolean:
..
GetWindowText(GetActiveWindow,p,256);
title:=p;
if title='' then ScreenSaverOn:=true;
Which is sort of indirect - the screensaver is the only window with a blank
title text. It is possible to detect if the mouse and keyboard are idle,
but that does not mean the screensaver has come on of course.
Is there anything more direct to detect the screensaver?
John
More information about the Delphi
mailing list