Wednesday, December 17, 2014

TIMER APPLICATION code for 20 Minutes Alert using c#

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

namespace Timer
{
    public partial class Form1 : Form
    {

        int i = Convert.ToInt32(0);
        public Form1()
        {
            InitializeComponent();
        }

        private void Form1_Load(object sender, EventArgs e)
        {

            label1.Text = DateTime.Now.ToString();
           

        }

        private void timer1_Tick(object sender, EventArgs e)
        {

            i++;
            if (i==20)
            {
                MessageBox.Show("20 minutes is left");
                i = 0;
            }

        }

No comments:

Post a Comment