bc-vnt Posted September 7, 2012 Report Posted September 7, 2012 Download : AlarmClock.rar download - 2sharedPublic Class Form1 Public Shared alarm_time As String Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load lbldateout.Text = Date.Today ' Displaying the current date on the Label Timer1.Start() ' Timer 1 is used to display the Current time End Sub Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick lbltimeout.Text = TimeOfDay 'lbltiemout is used to diaplay teh current time End Sub Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnsetalarm.Click alarm_time = lsthour.Text + ":" + lstmin.Text + ":" + lstsec.Text + " " + lstzone.Text 'Formatting the time one which alarm need to start temp.Text = alarm_time 'Assigning the time set by the user on a label to make the value static Timer2.Start() MsgBox("Alarm has been Sent", MsgBoxStyle.Information, "Alarm Clock for Normel") End Sub Private Sub Timer2_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer2.Tick Dim temp As String = TimeOfDay Dim value As String = My.Application.Info.DirectoryPath + "\" + "tone.mp3" 'Setting the path of the file (Relative Path) If alarm_time = temp Then ' Comparing the current time with the time set by the user AxMediaPlayer1.URL = value 'AxMediaPlayer1 is the Window media player tool used on the form on the bottom on right hand side to play sound End If End SubEnd ClassPentru cei care dorm tarziu, lasa pc aprins 4 scann sau altceva si a 2 zii dimineata la munca Licke subscribe ! Quote