• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 159
  • Last Modified:

activating screensaver on host from the server

which command can I use in Delphi to activate the screensaver on client machines from the server?
0
aussie_guy_nik
Asked:
aussie_guy_nik
  • 3
1 Solution
 
ginsonicCommented:
listening
0
 
classicsCommented:
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
 
ginsonicCommented:
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
 
ginsonicCommented:
aussie_guy_nik ,
Any comment ?
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now