C# countdown timer

后端 未结 4 1175
有刺的猬
有刺的猬 2020-12-16 01:39

I\'m trying to make a countdown using C# and show the time in format:

hour:minutes:seconds

I\'ve tried this:

 var minutes          


        
4条回答
  •  萌比男神i
    2020-12-16 02:02

    You could also use a Timer, as this would handle all the problems like UI-locking. You can use the System.Windows.Forms.Timer-Timer. In the MSDN library you can find samples of the use of it.

    The WinForms-Timer handles also the invoking across the Timer-thread and the UI-thread.

    - SeriTools

提交回复
热议问题