반응형
visual basic,비주얼베이직,vb .net강좌-알람시계,alarm clock,Audio Resources
현재시간과 정해진 시간을 세팅하면 팝업창과 소리가 울리는 프로그램입니다.,
Label 2개 , textbox 1개 ,button 1개, timer 1개를 셋팅합니다.
timer 셋팅입니다
사운드를 Resources 에 등록합니다.
Public Class Form1
Private Sub Timer1_Tick(sender As Object, e As EventArgs) Handles Timer1.Tick
Label1.Text = TimeString
If TimeString = Label2.Text Then
My.Computer.Audio.Play(My.Resources.squeaky, AudioPlayMode.WaitToComplete)
MessageBox.Show("ring alarm")
End If
End Sub
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
Label2.Text = TextBox1.Text
End Sub
End Class
반응형