Solved

activating screensaver on host from the server

Posted on 2002-04-08
4
151 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

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

757 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

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now