using System; using System.Drawing; using System.Windows.Forms; class Program01 : Form { Timer timer = new Timer(); Program01() { timer.Tick += new EventHandler(Timer_Tick); timer.Interval = 1000 * 1; timer.Enabled = true; timer.Start(); this.Text = "0"; this.Size = new Size(400, 300); this.Show(); } public void Timer_Tick(object sender, EventArgs e) { string szamStr = this.Text; int szam = Convert.ToInt32(szamStr); szam++; szamStr = Convert.ToString(szam); this.Text = szamStr; } public static void Main() { Application.Run(new Program01()); } }