adding sound
how can i make the program play a sound when my tmer is finished?
If txtSec.Text = 0 And txtMin.Text = 0 And txtHour.Text = 0 Then
Timer1.Enabled = False
<--------need sound to play here until cmd button pressed to stop it.
EndIf
Slavrix
Junior Poster in Training
70 posts since Oct 2005
Reputation Points: 10
Solved Threads: 0
Slavrix
Junior Poster in Training
70 posts since Oct 2005
Reputation Points: 10
Solved Threads: 0
does soundA get replaced by the name of the sound im using?
eg i the sound was called buzzer.mp3 what would the code look like?
Slavrix
Junior Poster in Training
70 posts since Oct 2005
Reputation Points: 10
Solved Threads: 0
thx man.
this has saved me about 6 years worth of stress induced age.
Slavrix
Junior Poster in Training
70 posts since Oct 2005
Reputation Points: 10
Solved Threads: 0
so umm, sry 4 being annoying, but if this is my code, were does this piece go?
Private Sub SDOpt_Click(Index As Integer)
Dim Msg As String
Msg = "Spin Dry is"
Select Case SDOpt(Index).Index
Case 0
Msg = Msg & " On"
Case 1
Msg = Msg & " Off"
End Select
Text7.Text = Msg
End Sub
Private Sub SSOpt_Click(Index As Integer)
Dim Msg As String
Msg = "Spin Speed is"
Select Case SSOpt(Index).Index
Case 0
Msg = Msg & " Fast"
Case 1
Msg = Msg & " Medium"
Case 2
Msg = Msg & " Slow"
End Select
Text6.Text = Msg
End Sub
Private Sub WLOpt_Click(Index As Integer)
Dim Msg As String
Msg = "Water Level"
Select Case WLOpt(Index).Index
Case 0
Msg = Msg & " High"
Case 1
Msg = Msg & " Medium"
Case 2
Msg = Msg & " Low"
End Select
Text4.Text = Msg
End Sub
Private Sub WTOpt_Click(Index As Integer)
Dim Msg As String
Msg = "Water Temp."
Select Case WTOpt(Index).Index
Case 0
Msg = Msg & " Hot"
Case 1
Msg = Msg & " Warm"
Case 2
Msg = Msg & " Cold"
End Select
Text5.Text = Msg
End Sub
Private Sub Timer1_Timer()
If txtSec.Text = 0 And txtMin.Text = 0 And txtHour.Text = 0 Then
Timer1.Enabled = False
ElseIf txtSec.Text > 0 Then
txtSec.Text = txtSec.Text - 1
Else 'if zero
txtSec.Text = 59
If txtMin.Text > 0 Then 'update mins
txtMin.Text = txtMin.Text - 1
Else
'check if Hour is 0, and if it is, then stop timer, else continue
txtMin.Text = 59
If txtHour.Text > 0 Then 'update mins
txtHour.Text = txtMin.Text - 1
Else
'check if Hour is 0, and if it is, then stop timer, else continue
txtHour.Text = 59
End If
End If
End If
End Sub
Private Sub startcmd_Click()
If startcmd.Caption = "Start Washing" Then
Timer1.Enabled = True
startcmd.Caption = "Pause / Stop"
ElseIf startcmd.Caption = "Pause / Stop" Then
Timer1.Enabled = False
startcmd.Caption = "Start Washing"
End If
End Sub
Slavrix
Junior Poster in Training
70 posts since Oct 2005
Reputation Points: 10
Solved Threads: 0
Slavrix
Junior Poster in Training
70 posts since Oct 2005
Reputation Points: 10
Solved Threads: 0