Assigning the "Tick" event handler to a Timer C# with Example



Assigning the "Tick" event handler to a Timer C# with Example

All actions performed in a timer are handled in the "Tick" event. 
public partial class Form1 : Form 
{ 
Timer myTimer = new Timer(); 
public Form1() 
{ 
InitializeComponent(); 
myTimer.Tick += myTimer_Tick; //assign the event handler named "myTimer_Tick" 
} 
private void myTimer_Tick(object sender, EventArgs e) 
{ 
// Perform your actions here. 
} 
} 

0 Comment's

Comment Form

Submit Comment