Solved

activating screensaver on host from the server

Posted on 2002-04-08
4
153 Views
Last Modified: 2010-04-04
which command can I use in Delphi to activate the screensaver on client machines from the server?
0
Comment
Question by:aussie_guy_nik
  • 3
4 Comments
 
LVL 9

Expert Comment

by:ginsonic
ID: 6925676
listening
0
 

Expert Comment

by:classics
ID: 6927527
You will need to listen on a socket on each client machine.  Then have the server send the client a special message of whatever kind you like, then once the client gets it, trigger:

PostMessage(HWND_BROADCAST, WM_SYSCOMMAND, SC_SCREENSAVE, 0);

To start the local screensaver.
0
 
LVL 9

Accepted Solution

by:
ginsonic earned 100 total points
ID: 6927881
Read at http://www.delphi3000.com/articles/article_3072.asp the 'Shutting down a machine acrosa a network'.
This sample explaine how to send a command over a net.

Replace :

if Incomming = 'S' then // Shutdown Protocol
    ExitWindowsEx( EWX_FORCE or EWX_SHUTDOWN, 0 );

with

if Incomming = 'S' then // ScreenSaver Protocol
    PostMessage(GetDesktopWindow, WM_SYSCOMMAND, SC_SCREENSAVE, 0);




 Or:
SendMessage(handle, wm_syscommand, SC_SCREENSAVE, 0);
0
 
LVL 9

Expert Comment

by:ginsonic
ID: 6936475
aussie_guy_nik ,
Any comment ?
0

Featured Post

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

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

Suggested Solutions

This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

770 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