Solved

activating screensaver on host from the server

Posted on 2002-04-08
4
156 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
[X]
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
  • 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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
Come and listen to Percona CEO Peter Zaitsev discuss what’s new in Percona open source software, including Percona Server for MySQL (https://www.percona.com/software/mysql-database/percona-server) and MongoDB (https://www.percona.com/software/mongo-…
NetCrunch network monitor is a highly extensive platform for network monitoring and alert generation. In this video you'll see a live demo of NetCrunch with most notable features explained in a walk-through manner. You'll also get to know the philos…

724 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