C# Windows Forms Tutorial #23 - How to Create a Countdown Clock

Поделиться
HTML-код
  • Опубликовано: 19 ноя 2024

Комментарии • 26

  • @Daniel4Yah
    @Daniel4Yah 4 года назад +2

    The code file would be very helpful.
    This was exactly what I needed thanks man.

  • @davidhouser9280
    @davidhouser9280 Год назад

    can you add hours mins and secs the same way and could the timer be set by having a button open a set timer function (instead of the combo boxes and also a reset timer button? Ok so I have added almost same as you but i have 3 buttons and 3 combo boxes start stop reset and hours mins seconds just not sure the codes

  • @maksimkobylyuk7994
    @maksimkobylyuk7994 3 года назад

    any way to change it so when it goes down to 9 and below it stays in the last digital instead of moving up?

  • @raly3622
    @raly3622 2 года назад

    In addition, can you make a tutorial on how to compare a specified time, and d
    Computer time, thanks again 🙂..

  • @sikevibin2852
    @sikevibin2852 4 года назад

    that helped me a lot, but how can you add a second user so a 2 usernames and 2 passwords?

  • @cencom01
    @cencom01 3 года назад

    Thanks for making this great video. Question; Would you know how I could have an audible alert when the timer reaches 0?

    • @cencom01
      @cencom01 3 года назад

      Figured it out by adding this script above the MessageBox script. System.Media.SystemSounds.Hand.Play();

    • @skyechapman6595
      @skyechapman6595 3 года назад

      I’m trying to make a quick game for a project that’s timer based. Essentially complete a level within a minute. Was this the same approach you did?

  • @raly3622
    @raly3622 2 года назад

    Hi, thanks for the video. Can you please make a tutorial on how to include hour. Thanks 😀.

    • @IISLEEPII
      @IISLEEPII Год назад

      hi did you figure out how to add hours?

  • @davidhouser9280
    @davidhouser9280 Год назад

    how can you add a reset Button?

  • @RhyanDiansay
    @RhyanDiansay 2 года назад

    how to include the milliseconds?

  • @cencom01
    @cencom01 3 года назад

    Would you know how to grey out the stop button when the time reaches 0. This way the user doesn't have to first click stop then start to restart the timer.

    • @codigo_logo
      @codigo_logo  3 года назад

      this.button1.Enabled = false; in the function

  • @tuanpm3005
    @tuanpm3005 4 года назад

    Many thanks!

  • @adammunajah
    @adammunajah 4 года назад

    Can we just download it?

  • @sidrashaikh6236
    @sidrashaikh6236 2 года назад

    Can you upload the code as well? Thanks!

  • @martinp.617
    @martinp.617 4 года назад

    Salamat..,

  • @paraskhosla9622
    @paraskhosla9622 3 года назад

    thanx brother :)

  • @aaron7665
    @aaron7665 4 года назад

    Hi sir, how to create a countdown clock including the hour, min, and seconds ?

    • @IISLEEPII
      @IISLEEPII Год назад

      hi, i know its alongtime since your comment but did you figure out how to input the hours?

  • @DewandaruCandraYuda
    @DewandaruCandraYuda 3 года назад

    So i'm streamer , i have 1 monitor . I need my popout comment always on front of game ,like countdown.

  • @preeminentacademy6427
    @preeminentacademy6427 4 года назад

    best brother best

  • @davidhouser9280
    @davidhouser9280 Год назад

    Ok I went back to just minutes and seconds but would like to add hours nothing I tried seem to work.
    Ok i have added all code like said but for hours minutes and seconds and removed the idea of reset, Nothing shows in the text box when selected and click start and no error meaasges textbox just show 00:00:00 private void timer1_Tick(object sender, EventArgs e)
    {
    if (totalSeconds > 0)
    {
    totalSeconds--;
    int hours = totalSeconds / 3600;
    int minutes = totalSeconds / 60;
    int seconds = totalSeconds - (hours * 3600 - minutes * 60);
    this.label3.Text = hours.ToString() + ":" + minutes.ToString() + ":" + seconds.ToString() + ":";