Screen saver in windows application

screen saver or slide show in windows application in .net

Screen saver in windows application

Hello friends here is the code of screen saver in windows application of .Net .suppose your project name is demo then put some .jpg images inside this path D:\demo\bin\debug\ .give the name of images like 1.jpg,2.jpg,3.jpg etc and write down following code in which we initialize i =1; then drag and drop timer control from tool box .At timer control timer1_tick event write down below code .on timer tick event your application automatically taking images from path(D:\demo\bin\debug\1.jpg ) set timer enable property to true .

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace WindowsApplication1
public partial class Form1 : Form
Private int i;
public Form1()


private void timer1_Tick(object sender, EventArgs e)

this.BackgroundImage = Image.FromFile(Application.StartupPath + "\\" + i + ".jpg");
if (i > 4)
i = 1;

Related Articles

Write a Console Application for beginners

.NET framework contains Console application,Windows applications usually called as Win Apps,Web applications,Mobile applications,Web Services.Let us know how to write a simple Hello World using Console Application in the Visual Studio.NET framework tool 2008.

More articles: Slide show Screen saver Windows application Timer control


No responses found. Be the first to comment...

  • Do not include your name, "with regards" etc in the comment. Write detailed comment, relevant to the topic.
  • No HTML formatting and links to other web sites are allowed.
  • This is a strictly moderated site. Absolutely no spam allowed.
  • Name: