Advertisement
Guest User

Untitled

a guest
Oct 15th, 2012
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.73 KB | None | 0 0
  1.  public partial class Form1 : Form
  2.     {
  3.         int i = 0;
  4.         public Form1()
  5.         {
  6.             InitializeComponent();
  7.             timer1.Enabled = true;
  8.         }
  9.  
  10.         private void timer1_Tick(object sender, EventArgs e)
  11.         {
  12.             this.textBox1.Text = "";
  13.             this.textBox1.Text = "Timer ticked event called " + i + " times";
  14.             i++;
  15.         }
  16.     }
  17.  
  18. /// <summary>
  19.         /// Required method for Designer support - do not modify
  20.         /// the contents of this method with the code editor.
  21.         /// </summary>
  22.         private void InitializeComponent()
  23.         {
  24.             this.components = new System.ComponentModel.Container();
  25.             this.textBox1 = new System.Windows.Forms.TextBox();
  26.             this.timer1 = new System.Windows.Forms.Timer(this.components);
  27.             this.SuspendLayout();
  28.             //
  29.             // textBox1
  30.             //
  31.             this.textBox1.Location = new System.Drawing.Point(12, 88);
  32.             this.textBox1.Name = "textBox1";
  33.             this.textBox1.Size = new System.Drawing.Size(268, 20);
  34.             this.textBox1.TabIndex = 0;
  35.             //
  36.             // timer1
  37.             //
  38.             this.timer1.Tick += new System.EventHandler(this.timer1_Tick);
  39.             //
  40.             // Form1
  41.             //
  42.             this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
  43.             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
  44.             this.ClientSize = new System.Drawing.Size(292, 266);
  45.             this.Controls.Add(this.textBox1);
  46.             this.Name = "Form1";
  47.             this.Text = "Form1";
  48.             this.ResumeLayout(false);
  49.             this.PerformLayout();
  50.  
  51.         }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement