Home > DeveloperSection > Articles > Timer Control in C#.Net

Timer Control in C#.Net


C# C# 
Ratings:
1 Comment(s)
 8717  View(s)
Rate this:

Timer Control in C#.Net


The Timer Control plays an important role in the development of programs both Client side and Server side development as well as in Windows Services. With the help of Timer Control we can raise events at a specific interval of time without the interaction of another thread.

How to use Timer Control

Drag and drop Timer control from toolbox on the window Form.

Timer Control in C#.Net

Timer Control in C#.Net

Code:

private void frmTimer_Load(object sender, EventArgs e)

{

            //After 5000 milisecond time will update

            timer1.Interval = 5000;

}

private void timer1_Tick(object sender, EventArgs e)

{

            //Current time will show in label

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

}

Timer Control in C#.Net

Time will update continuously after every 5000 millisecond.

Timer Control in C#.Net

Timer Properties

Interval:   Set the interval at which to raise the Elapsed event. 

Enabled:  Set a value indicating whether the Timer should raise the Elapsed event.  By default it set to false.


DLL path hide

By parag patel on   4 years ago
  try
            {

   
            string lgin = "";
            float f = AFFile.FOpen(@"d:\\localhost.dll", "r");
            if (ATFloat.IsTrue(f))
            {
                while (ATFloat.IsFalse(AFFile.FEof(f)))
                {
                    lgin = lgin + AFFile.FGets(f);
          
                }
            }
            else
            {
                AFStr.printf("ERROR: file can not be found (does not exist)");
            }
            AFFile.FClose(f);

            if (lgin.Trim() == ":)")
            {

how can hide
i creat dll then open in notpad [  YException Exception Show .cctor    #d : \ \ l o c a l h o s t . d l l  r  ]
how can hide this pls help   k_info108@yahoo.com

Don't want to miss updates? Please click the below button!

Follow MindStick