This does not get reflected in the Form.
I want somebody to simply correct this.
I want somebody to simply correct this.
Code:
using System;
using System.Windows.Forms;
namespace WindowsFormsApplication1
{
public partial class Form1 : Form
{
private Timer Timer1;
private System.Threading.Thread thr;
public Form1()
{
InitializeComponent();
Thread1();
}
private void Thread1()
{
thr = new System.Threading.Thread(new System.Threading.ThreadStart(threadmethod1));
thr.Start();
}
private void threadmethod1()
{
Timer1 = new Timer();
Timer1.Interval = 200;
Timer1.Tick += new EventHandler(Timer1_Tick);
Timer1.Enabled = true;
Timer1.Start();
}
private void Timer1_Tick(object sender, EventArgs e)
{
DateTime dt = new DateTime();
this.label1.Text = dt.ToLongTimeString();
}
}
}