Christopherx
Well-known member
- Joined
- Jul 4, 2010
- Messages
- 58
- Programming Experience
- Beginner
So I've written a programme that will function as an alarm clock:
I then created a shortcut for it, and moved it onto my desktop. I do have an issue though. You see, when it goes to play it I get an error message telling me its having an exception processing some wild stuff, and then that will pop up about 8 times. When I begin button bashing, it goes away and the programme plays the song. However, whats sucky is that when im asleep, I shall not be clicking, and thus need help! Anyone got any suggestions ?
VB.NET:
Public Class Form1
Dim time As Date
Dim path As String
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim temp As String
temp = NumericUpDown1.Value.ToString + ":" + NumericUpDown2.Value.ToString + " " + ComboBox1.SelectedItem.ToString
Me.Text = "Alarm Set for " & temp
time = temp
Timer1.Start()
End Sub
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
AxWindowsMediaPlayer1.Visible = False
Me.Text = "Alarm Clock Chris Cooney(c)"
End Sub
Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
If time = TimeOfDay Then
AxWindowsMediaPlayer1.URL = path
End If
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
AxWindowsMediaPlayer1.Ctlcontrols.stop()
MsgBox("Dont Rage", , Title:="Lol")
End Sub
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
OpenFileDialog1.ShowDialog()
path = OpenFileDialog1.FileName
End Sub
End Class
Last edited by a moderator: