Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Starting screen saver with Visual C++

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
I'm writing a program that will load an icon and put it in the system tray, this icon will allow you to start the screensaver when you click on it. This way when you walk away from your computer, you can be sure that it's password protected the whole time. My problem is that I'm not quite sure on how to make the screensaver start.

Any help on this would be greatly appreciated.

Thanks in advance,

theOtherThe
 
Since apparently no one knows the answer...I'll tell you.

You simply call:

PostMessag(HWND_BROADCAST, WM_SYSCOMMAND, SC_SCREENSAVE, NULL);

in your program and presto, you've loaded your screensaver, password protected and everything. It's almost like magic, but a whole lot more fun.

Hope this helps...

theOtherThe
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top