Click here to Skip to main content
15,895,746 members
Articles / Programming Languages / C#

Controlling The Screen Saver With C#

Rate me:
Please Sign up or sign in to vote.
4.48/5 (26 votes)
8 Jan 2007CPOL5 min read 257.8K   8.2K   98  
A C# class for monitoring, activating, deactivating, closing, and changing the timeout of the screen saver.
using System;
using System.Collections.Generic;
using System.Windows.Forms;

namespace ScreenSaver_Control
{
	static class Program
	{
		/// <summary>
		/// The main entry point for the application.
		/// </summary>
		[STAThread]
		static void Main( )
		{
			Application.EnableVisualStyles( );
			Application.SetCompatibleTextRenderingDefault( false );
			Application.Run( new ScreenSaverTest( ) );
		}
	}
}

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Web Developer
United States United States
Kurt's programming career began in 1978, developing firmware for the Zilog Z80-A microprocessor on a Mostek development workstation. For 23 years, Kurt led the development of Human Machine Interface (HMI) programs used in factory automation, marketed and sold worldwide by CTC and Parker Hannifin as ScreenWare, Interact and InteractX. For the last 4 years, Kurt has been consulting on agile development practices and working as an independent software contractor focusing on graphical and user interface development.

Other passions include spending time with his wife Janice, daughters Erica and Laura, scuba diving, target shooting, guitar, travel, and digital photo imaging and restoration. Currently residing in southwestern Ohio.

Comments and Discussions