Pastebin launched a little side project called VERYVIRAL.com, check it out ;-) Want more features on Pastebin? Sign Up, it's FREE!
Guest

Untitled

By: a guest on Oct 15th, 2012  |  syntax: C#  |  size: 0.64 KB  |  views: 24  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. int i = 0;
  2.         Form2 frm;
  3.         public Form1()
  4.         {
  5.             InitializeComponent();
  6.             timer1.Enabled = true;
  7.         }
  8.  
  9.         private void timer1_Tick(object sender, EventArgs e)
  10.         {
  11.             this.textBox1.Text = "";
  12.             this.textBox1.Text = "Timer ticked event called " + i + " times";
  13.             i++;
  14.  
  15.             if (frm != null)
  16.                 frm.textBox1.Text = this.textBox1.Text;
  17.         }
  18.  
  19.         private void button1_Click(object sender, EventArgs e)
  20.         {
  21.             frm = new Form2();
  22.             frm.textBox1.Text = this.textBox1.Text;
  23.             frm.Show();
  24.         }