Solved

activating screensaver on host from the server

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
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…
This tutorial gives a high-level tour of the interface of Marketo (a marketing automation tool to help businesses track and engage prospective customers and drive them to purchase). You will see the main areas including Marketing Activities, Design …
This is used to tweak the memory usage for your computer, it is used for servers more so than workstations but just be careful editing registry settings as it may cause irreversible results. I hold no responsibility for anything you do to the regist…

895 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

14 Experts available now in Live!

Get 1:1 Help Now