SHARE
TWEET

Untitled

a guest Oct 15th, 2012 24 Never
  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.         }
RAW Paste Data
Top