🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.nativeapi
Article #4728

Detect WinXP Login Screen

#4728
From: Thom A.
Date: Wed, 14 Dec 2005 22:17
26 lines
1762 bytes
I use the following code to detect when a screen saver has been started, 
and when it was stopped:

global variable:
----------------
     BOOL ScreensaverRunning = false;    // global variable

periodic poll:
--------------
     BOOL bOn=FALSE;
     BOOL b=SystemParametersInfo(SPI_GETSCREENSAVERRUNNING, NULL, &bOn, 
FALSE);
     BOOL ScreensaverOn = b && bOn;
     if  (ScreensaverOn != ScreensaverRunning)
     {
         ScreensaverRunning = ScreensaverOn;
         if (ScreensaverOn) Trace(Application,"Screen Saver activated");
                       else Trace(Application,"Screen Saver stopped");
     }

Now this tells me that a screen saver has been stopped, but it doesn't 
detect whether the Windows XP login screen, or the Login window is 
visible. Is there a way to detect this, either?


Thomas
Technical Details
Message-ID: <43a099bd$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!news.moat.net!news-out.superfeed.net!propagator2-sterling.newsfeeds.com!in.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,eda9c56c5ddeb0a7,start
X-Google-Attributes: gid10cc67,public
X-Google-Language: ENGLISH,ASCII-7-bit
Date: Wed, 14 Dec 2005 23:17:48 +0100
From: "Thom A." <thoma@gmx.at>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.5) Gecko/20041217
X-Accept-Language: en-us, en
MIME-Version: 1.0
Newsgroups: borland.public.cppbuilder.nativeapi
Subject: Detect WinXP Login Screen
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: 84.166.215.49
Message-ID: <43a099bd$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1134598589 84.166.215.49 (14 Dec 2005 14:16:29 -0700)
Lines: 26
Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!news.moat.net!news-out.superfeed.net!propagator2-sterling.newsfeeds.com!in.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mail