Welcome to Dream.In.Code
Getting C# Help is Easy!

Join 136,544 C# Programmers for FREE! Get instant access to thousands of C# experts, tutorials, code snippets, and more! There are 1,866 people online right now. Registration is fast and FREE... Join Now!




Song Alarm

 
Reply to this topicStart new topic

Song Alarm, Alarm Clock that plays a selected song!

jay_t55
17 Aug, 2008 - 09:25 AM
Post #1

New D.I.C Head
*

Joined: 10 Aug, 2008
Posts: 3

Hey all,

I'm new to c# and am wanting to write an application that is very basic (for now). I want to be able to set an alarm for my computer so that it wakes me up in the morning. And I want this alarm application to not play a silly old beep-beep tone, but to plauan actual MP3 file, or WMA file or OGG Vorbis file at the specified alarm-time. E.g:

At 10PM I set my alarm for 7AM the following morning. And that morning when the alarm goes off at 7AM my song will play.

Any help/samples would be greatly appreciated!

Lots of thanks in advance.

Jay.
User is offlineProfile CardPM
+Quote Post

gbertoli3
RE: Song Alarm
17 Aug, 2008 - 10:55 AM
Post #2

DIC at Heart + Code
Group Icon

Joined: 23 Jun, 2008
Posts: 1,046



Thanked: 17 times
Dream Kudos: 950
My Contributions
Dream.In.Code has a policy by which we prefer to see a good faith effort on your part before providing source code for homework assignments. Please post the code you have written in an effort to resolve the problem, and our members would be happy to provide some guidance. Be sure to include a description of any errors you are encountering as well.

Please post like this:

Thank you for helping us helping you.
User is offlineProfile CardPM
+Quote Post

jacobjordan
RE: Song Alarm
17 Aug, 2008 - 11:32 AM
Post #3

class Me : Perfection
Group Icon

Joined: 11 Jun, 2008
Posts: 1,166



Thanked: 32 times
Dream Kudos: 1625
My Contributions
I'm sorry, but we can't just write you a program. Try it on your own, and if you get trouble with anything, i'm sure we can help you with it. Also, there is a tutorial on making an mp3 player you might want to check out. It is in VB.NET, but you should be able to figure out the basic method it is using.
User is offlineProfile CardPM
+Quote Post

Jayman
RE: Song Alarm
17 Aug, 2008 - 12:40 PM
Post #4

Student of Life
Group Icon

Joined: 26 Dec, 2005
Posts: 6,947



Thanked: 42 times
Dream Kudos: 500
Expert In: C#, VB.NET, Java

My Contributions
To play an MP3 file you will need to use the Windows Media Player component, you will need to add it to your toolbox. Just set the visibility to false, unless you want it displayed on your alarm clock.

Use a DateTime object to get the current system time on your computer and then tell WMP to play the file when it is time to sound the alarm. Of course, there is a little more to it than that but, this should get you started.
Using the Windows Media Player Control with Microsoft Visual Studio
Datetime structure

If you have any question or get stuck, post your code and we will be happy to help.
User is offlineProfile CardPM
+Quote Post

Fast ReplyReply to this topicStart new topic
Time is now: 12/2/08 10:50PM

Live C# Help!

C# Tutorials

Reference Sheets

C# Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month