C# Application - How to make an Alarm clock with sound

แชร์
ฝัง
  • เผยแพร่เมื่อ 31 ธ.ค. 2024

ความคิดเห็น • 98

  • @WizPigTactics
    @WizPigTactics 6 ปีที่แล้ว +3

    For those wondering why stop is not working, it's because the btnStop_Click is lacking a function call to stop the sound. (Layman english Translation) Your button to stop the timer doesn't realize that it's supposed to stop the sound as well.
    "player.Stop();"

    • @SalmanMKC
      @SalmanMKC 6 ปีที่แล้ว

      Thanks!

    • @fiars7159
      @fiars7159 6 ปีที่แล้ว +3

      And if there are any errors try this:
      SoundPlayer player = new Soundplayer();
      player.Stop();

    • @r0b3rt04
      @r0b3rt04 2 ปีที่แล้ว

      it says that i can t use local variable before it s declared

  • @zenhaa
    @zenhaa 3 ปีที่แล้ว +1

    hi, im having trouble with the datetimepicker, when i press the start button the souns starts immediatle instead of waiting til the time i have set before...

    • @adriandiaz1636
      @adriandiaz1636 3 ปีที่แล้ว

      I have the exact same problem, did you figured it out?

  • @daniellemarais3266
    @daniellemarais3266 2 ปีที่แล้ว

    Good day I tried doing your coding on alarm clock but the one error that it has is in the vale about 2:45minutes into the video. It is sayon that the object does not contain a definition for 'Value', Please can someone assist in what I am doing wrong? Thank you, :)

  • @TheTubejunky
    @TheTubejunky 9 หลายเดือนก่อน

    7years ago and still helpful.
    I made this with windows forms years ago and forgot how i did it. this answered my questions.
    Also you can make a timer object and for each tick have it update a label to the current date&time.
    eg:
    //make sure the name of your timer matches this voids name "timer1"
    private void timer1_Tick(object sender, EventArgs e)
    {
    label1.Text = DateTime.Now.ToString();
    }

  • @joen5000
    @joen5000 5 ปีที่แล้ว +2

    There is no "DateTime userTime = DateTimePicker.Value;" value property if done similar to the code in the video.
    Does anyone know a solution for that?
    It seems that DateTimePicker1 has a "value" property, but not DateTimePicker
    Any suggestions

    • @foxlearn
      @foxlearn  5 ปีที่แล้ว

      Please check your code again. i think you miss something

    • @benya1066
      @benya1066 4 ปีที่แล้ว

      @@foxlearn I have the same issue, could you post the source somewhere?

    • @aleksandarmitrovic3903
      @aleksandarmitrovic3903 4 ปีที่แล้ว

      For future audiences ... when you click on the clock and go to the property, you have "Name" there and it is marked "dateTimePicker1" and the code in the video says "dateTimePicker" so it can't recognize.

  • @danielelvito6803
    @danielelvito6803 6 ปีที่แล้ว +1

    thank you for best tutorials ever ♥

  • @walney2008
    @walney2008 3 ปีที่แล้ว

    Hello, how are you ? I have a cv file, with musical notes and how long it should be played in sequence, how to put it to play?
    Do; 0.1456
    Re, 0.1567
    Mi, 0.1645
    Do, 0.1545
    so this is the csv that i am defining for example, how to read this note in sequence and play? thank you

  • @abrahamnono8505
    @abrahamnono8505 2 ปีที่แล้ว

    Can it run when close?

  • @theafricanwalkchannel4302
    @theafricanwalkchannel4302 6 ปีที่แล้ว

    thanks for the tutorial, i have been searching for it.

  • @leonardchung9729
    @leonardchung9729 3 ปีที่แล้ว

    How did you use the sound?

  • @charleewood2119
    @charleewood2119 8 ปีที่แล้ว

    Thank you so much for this. I am looking forward to some more videos keep it up.

  • @mykhalex
    @mykhalex 4 ปีที่แล้ว +1

    if you want btnStop to stop the music, then write:
    "SoundPlayer player = new SoundPlayer(); " (be sure that you delete the similar string in your Timer_elapsed void)
    right below
    "System.Timers.Timer timer;"
    in your public partial class, then in btnStop.click write this:
    player.Stop();

    • @foxlearn
      @foxlearn  4 ปีที่แล้ว +1

      Thank you !

    • @sinerion
      @sinerion 2 ปีที่แล้ว

      thanks a lot !

  • @lyozov974
    @lyozov974 7 ปีที่แล้ว +1

    +1 for the choice of music

  • @DblessinnovativetechBlogspot
    @DblessinnovativetechBlogspot 8 ปีที่แล้ว

    Great Tutorial @ Fox Learn, keep it up!!
    :)

    • @foxlearn
      @foxlearn  8 ปีที่แล้ว

      +DBless Innovative Technology Thank you ^_^

  • @kemaltunc8774
    @kemaltunc8774 8 ปีที่แล้ว

    Really useful shares. Thank you Fox learn.

    • @foxlearn
      @foxlearn  8 ปีที่แล้ว

      +Kemal TUNÇ Thank you ^_^

  • @gabegamez1018
    @gabegamez1018 ปีที่แล้ว

    how do i make a form?

  • @FauziJabbar
    @FauziJabbar 4 ปีที่แล้ว

    Well, to get information in system with realtime.. we need timer, so gimana ada alternative lain tidak selain dari menggunakan timer to get time

  • @Yutani_Crayven
    @Yutani_Crayven 7 ปีที่แล้ว

    Had a squiggly line under SoundPlayer at first. Adding using System.Media; in the top 10 lines fixed it.

  • @rafiodisho5633
    @rafiodisho5633 8 ปีที่แล้ว

    Nice, Thanks for sharing.

    • @foxlearn
      @foxlearn  8 ปีที่แล้ว

      +Rafi Odisho Thank you :)

  • @mohitsharma2376
    @mohitsharma2376 8 ปีที่แล้ว

    how can i make it in a way that it runs in background........like even if its not visible in the monitor....!!

    • @foxlearn
      @foxlearn  8 ปีที่แล้ว

      Hi, You can hide form, You can view this video th-cam.com/video/NMmyI-oMC_g/w-d-xo.html . thanks

  • @טלסעדי
    @טלסעדי 8 ปีที่แล้ว

    hey, very nice video.
    .I have one question, I want to add a button that stop the sound when the user clicks on it
    The problem is that when I try to make a method for btnStop_Click,
    it can't recognize the player beacuse the player is closed in the Timer_Elapsed method.
    What can i do?

  • @okokok3383
    @okokok3383 4 ปีที่แล้ว +1

    I wrote the source code but don't know how to add sound

    • @foxlearn
      @foxlearn  4 ปีที่แล้ว +1

      Find your sound directory in your os, then add it

    • @okokok3383
      @okokok3383 4 ปีที่แล้ว

      Ok thank I will try💗

  • @johncarlomallari870
    @johncarlomallari870 8 ปีที่แล้ว

    I dont know how to stop the music can you help me please?

    • @foxlearn
      @foxlearn  8 ปีที่แล้ว

      Hi, You can use player.Stop(); to stop play the music. thanks

  • @aminefarhat6246
    @aminefarhat6246 8 ปีที่แล้ว

    that's great thank you so much

    • @foxlearn
      @foxlearn  8 ปีที่แล้ว

      +Amine Farhat Thank you ^^_^^

  • @fap1855
    @fap1855 3 ปีที่แล้ว +1

    4:25

  • @okokok3383
    @okokok3383 4 ปีที่แล้ว

    How to add sound plz guide about that

    • @foxlearn
      @foxlearn  4 ปีที่แล้ว

      Find your sound directory, then add it

  • @petar8459
    @petar8459 6 ปีที่แล้ว

    Culd yuo please make alarm if your phones tuchet.

    • @foxlearn
      @foxlearn  6 ปีที่แล้ว +1

      Thank you for your suggestion

    • @petar8459
      @petar8459 6 ปีที่แล้ว

      @@foxlearn Thanks

  • @moussagerges6709
    @moussagerges6709 4 ปีที่แล้ว

    Thank you very much😊, you can find source code here: github.com/MoussaGerges9/Alarm-clock.git

    • @foxlearn
      @foxlearn  4 ปีที่แล้ว

      Thank you !

  • @romanchikusan
    @romanchikusan 6 ปีที่แล้ว

    please send me too))) 13ternopil