Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int i = 0;
- Form2 frm;
- public Form1()
- {
- InitializeComponent();
- timer1.Enabled = true;
- }
- private void timer1_Tick(object sender, EventArgs e)
- {
- this.textBox1.Text = "";
- this.textBox1.Text = "Timer ticked event called " + i + " times";
- i++;
- if (frm != null)
- frm.textBox1.Text = this.textBox1.Text;
- }
- private void button1_Click(object sender, EventArgs e)
- {
- frm = new Form2();
- frm.textBox1.Text = this.textBox1.Text;
- frm.Show();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement