public Form1() { InitializeComponent(); p = new Panel(); p.Size = new System.Drawing.Size(360, 500); p.BorderStyle = BorderStyle.FixedSingle; p.Name = "panel"; tpanel = new TableLayoutPanel(); tpanel.Name = "tablepanel"; ListBox lb = new ListBox(); tpanel.Controls.Add(lb = new ListBox() { Text = "qtylistBox2" }, 1, 3); Label l6 = new Label(); tpanel.Controls.Add(l6 = new Label() { Text = "0" }, 2, 1) //here is the timer that i created timer1.Interval = 1000; timer1.Tick += new EventHandler(timer1_Tick); timer1.Enabled = true; public void timer1_Tick(object sender, EventArgs e) { l6.Text = DateTime.Now.ToString("mm\\:ss"); }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)