02
ago
Quindi? C’è qualche stagista che ha fatto il danno??? ![]()
Convertitore da secondi a data completa.
Un modo semplice e veloce per realizzare un contatore con i secondi presi dal tick dell’oggetto timer.
1 2 3 4 5 6 7 8 9 10 11 12 13 | private void timer1_Tick(object sender, EventArgs e) { SecToTime(tick++); label1.Text = string.Format("{0}:{1}:{2}", hours, minutes, seconds); } private void SecToTime(int time) { days = time / 86400; hours = (time / 3600) - (days * 24); minutes = (time / 60) - (days * 1440) - (hours * 60); seconds = time % 60; } |
[ref -> albertopasca.it]