BOOL IsScreenSaverRunning()
BOOL bRunning = FALSE;
SystemParametersInfo(SPI_G
return bRunning;
}
Main Topics
Browse All TopicsI would like to be able to be notified (trap a message) when the screensaver becomes active on a computer, or at least be able to tell if it is active or not.
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
According to the SDK:
WM_SYSCOMMAND
A window receives this message when the user chooses a command from the Window menu
(formerly known as the system or control menu) or when the user chooses the maximize button,
minimize button, restore button, or close button.
SC_SCREENSAVE
Executes the screen saver application specified in the [boot] section of the System.ini file.
//I've setup a message map for the WM_SYSCOMMAND which should trigger
//an event if what you are saying is correct when the SS goes on or off.
BEGIN_MESSAGE_MAP
VCL_MESSAGE_HANDLER(WM_USE
VCL_MESSAGE_HANDLER(WM_QUE
VCL_MESSAGE_HANDLER(WM_POW
VCL_MESSAGE_HANDLER(WM_SYS
END_MESSAGE_MAP(TForm)
void __fastcall SysCommand(TMessage & Msg);
//In effect I should be seeing this process "SysCommand" being triggered whenever
//there is a Screen Saver (SS) on off event but I seee nothing
// it does trigger if I use the system menu of the application like the SDK says. But not on the the SS :(
void __fastcall TForm1::SysCommand(TMessag
{
ShowMessage(Msg.WParam);
ShowMessage("HURRAH!");
}
i_mahesh
>>In the appliation message loop you can listen to the WM_SYSCOMMAND message
>>with wParam as SC_SCREENSAVE to know when the screen saver is being invoked.
Any chance you could give me an example of how to do this, I would be hapopy to set it up as a 250 point question. I am happy to get an example in C/C++ but I am using CBuilder 5 so if you have experience with that, it would be even better.
Thanks,
Buddha
Business Accounts
Answer for Membership
by: b_vishwajitPosted on 2006-04-18 at 20:14:47ID: 16484122
Hi Mr.Buddha. This question has already been discussed. Please refer to the link e.com/Prog ramming/ Pr ogramming_ Languages/ Cplusplus/ Q_10152190 .html
http://www.experts-exchang
Let me know if it was helpful. You can award all the points to actual author of the answer.