MP3 Alarm Clock (Updated)

Heres your chance to share your own tutorials with the community. Just post them on here. If your lucky they may even be posted on the main site.
4 posts Page 1 of 1
Contributors
User avatar
hungryhounduk
VIP - Site Partner
VIP - Site Partner
Posts: 2870
Joined: Mon Jul 27, 2009 11:58 am

MP3 Alarm Clock (Updated)
hungryhounduk
Hi All

Here is a little Tutorial on how to create a Cool Looking MP3 Alarm Clock ;)
Again this is a very Easy, But very effective never the less lmao;
The code i have submitted below is for Buttons and not Checkboxes, so its up to you how you want it too look

Also i have my WindowsMediaPlayer Component below the Form and have hidden it from view

Once you have added the components and the code then Run the Application, Open your MP3 File that you wish to Play by clicking on the Open MP3 Button. Then set the Alarm Time by clicking in the textbox OnScreen and Set your Alarm Time. Then Press the Start Alarm Button, You should get a MessageBox Popup to say that the Alarm is on, and the same will happen when you click the Stop Alarm Button and that will say Alarm Off.
Image

With Themes Built in
Image
Image
Image
Image


OK Lets get Coding and get those Creative Juices Flowing Peeps :)

How about all those who create this, Reply to this Post with A SCREENSHOT of their Creation, it would be nice to see what you have Created cooll;

On your Form you will need

1 Textbox ( Set the Text in the Properties to 00:00:00 )
5 Buttons ( I have used Checkboxes for some of my Buttons)
3 Groupboxes ( Optional )
1 Combobox
1 Label
2 Timers
( Timer 1 is Enabled and the Interval is set to "1"
Timer 2 is False and the Interval is again set to "1
")

1 Windows MediaPlayer Component
1 OpenFileDialog


Timer 2 Code
Code: Select all
If TextBox1.Text = Label1.Text Then
            Timer1.Enabled = False
            AxWindowsMediaPlayer1.URL = ComboBox1.SelectedItem
            TextBox1.Clear()
        End If


Timer1 Code (which will show the Current Time)
Code: Select all
Label1.Text = TimeString



OpenFileDialog Code
Code: Select all
For Each track As String In OpenFileDialog1.FileNames
            ComboBox1.Items.Add(track)
        Next


Start Alarm Button Code (which is for setting the Alarm Time)
Code: Select all
Timer2.Enabled = True
        If TextBox1.Text = "00:00:00" Then
            MsgBox("Insert Time")
        End If
        MsgBox("Alarm On")


Stop Alarm Button Code
Code: Select all
Timer2.Enabled = False
        Timer1.Enabled = True
        MsgBox("Alarm Off")


Show Playlist Button Code
Code: Select all
ComboBox1.Visible = True


Hide Playlist Button Code
Code: Select all
ComboBox1.Visible = false


Open MP3 File Button Code
Code: Select all
OpenFileDialog1.ShowDialog()
Any Problems then please send me a message or reply to this post and i will get back to you ASAP and talk you through it



Chris
Image
User avatar
CodenStuff
Site Admin
Site Admin
Posts: 4392
Joined: Tue Aug 04, 2009 1:47 am

Re: MP3 Alarm Clock (Updated)
CodenStuff
Hello,

This is awsome! Good job cooll;

Im going to design a theme.
Welcome to CodenStuff.com Learn Code, Love Code. Thank you for being a member of the community.
User avatar
CodemaN
VIP Access - Denied
VIP Access - Denied
Posts: 74
Joined: Fri Sep 18, 2009 3:18 pm

Re: MP3 Alarm Clock (Updated)
CodemaN
perfect man...!!!!
User avatar
GodsAwesome
Just Registered
Just Registered
Posts: 1
Joined: Tue Dec 01, 2009 11:38 pm

Re: MP3 Alarm Clock (Updated)
GodsAwesome
Ok, well is there any way to make the songs stay in the list box?
4 posts Page 1 of 1
Return to “Tutorials”