Turning screen saver off in Delphi 1

Posted on 1999-07-02
Medium Priority
Last Modified: 2010-04-06
How do you turn the screen saver off in Delphi 1 (for Windows 3.1 programming)? I want to turn it off when it is running. I've tried the WIN3.1 API SendMessage function, but I may be sending the wrong parameters. (Please test anything before you post it.) I have used the API function SystemParametersInfo to make sure a screensaver is available, and then the PostMessage (GetDeskTopWindow, WM_SYSCOMMAND, SC_SCREENSAVE, 0) to start the screensaver, but I can't get the screensaver to stop running.
Question by:elmarais
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
LVL 13

Expert Comment

ID: 1385771
Use   SystemParametersInfo(SPI_SETSCREENSAVEACTIVE, 0, nil, 0);


Author Comment

ID: 1385772
Edited text of question.
LVL 20

Expert Comment

ID: 1385773
Well, I don't have D1 installed, so I can't test it. But this should work:


Regards, Madshi.

Author Comment

ID: 1385774
Well, Madshi - it works! ! ! !

You saved me a l-o-t of time, thanks!

Now how do I get the 100 points back? :-)
LVL 20

Accepted Solution

Madshi earned 400 total points
ID: 1385775
Well, that's great that it works. I only hoped that these APIs were available in 16bit Windows, too...   :-)

How you get your points back?    :-)
Either wait 20 days (you get 5 points each day) or buy 100 points...    :-)

Regards, Madshi.

Featured Post

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…
Suggested Courses

718 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question