🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Stopping the Windows Screen Saver...

#16218
From: Mike Collins
Date: Tue, 27 May 2003 21:32
28 lines
1703 bytes
Hi all, just a quick question.

I'm developing an application and I want to stop the Windows Screen Saver
from starting whilst the application is running.  I've achieved this in the
passed by handling the WM_SYSCOMMAND / SC_SCREENSAVE within a Message
Processing method i.e.

void __fastcall TForm1::ProcessMessage (TMsg &message, bool &handled)
{
  if (message.message == WM_SYSCOMMAND
      && message.wParam == SC_SCREENSAVE)
  {
    handled = true;
  }
  else
  {
   handled = false;
  }
}

-this seemed to work fine under Windows 95 / 98, but i've just tried it
under Win2K and it doesn't work!

Any ideas why??

Thanks in advance,

Mike C
Technical Details
Message-ID: <3ed3d8a9@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-09!supernews.com!64.152.100.70.MISMATCH!sjc70.webusenet.com!news.webusenet.com!cyclone.bc.net!news-hog.berkeley.edu!ucberkeley!nntp-relay.ihug.net!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10cc67,51aedba360c457e2,start
X-Google-Attributes: gid10cc67,public
X-Google-ArrivalTime: 2003-05-27 14:35:36 PST
Reply-To: "Mike Collins" <mikec@kr8.co.uk>
From: "Mike Collins" <mikec@kr8.co.uk>
Newsgroups: borland.public.cppbuilder.nativeapi
Subject: Stopping the Windows Screen Saver...
Date: Tue, 27 May 2003 22:32:26 +0100
Lines: 30
Organization: kr8
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
NNTP-Posting-Host: 81.2.78.34
Message-ID: <3ed3d8a9@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1054070953 81.2.78.34 (27 May 2003 14:29:13 -0700)
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-09!supernews.com!64.152.100.70.MISMATCH!sjc70.webusenet.com!news.webusenet.com!cyclone.bc.net!news-hog.berkeley.edu!ucberkeley!nntp-relay.ihug.net!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail