An option available to the user is called "Talk". When called the program Speaks the name of the date in a native language.
Here is my code:
Private Sub Talk_Click()
Dim lngRC As Long
'First Play Tzolkin Coefficient
lngRC = PlaySound(SoundFile + Asnd, 0&, &H2)
'Then Say Tzolkin Day Name
lngRC = PlaySound(SoundFile + Bsnd, 0&, &H2)
Dim t0 'Pause between two dates
t0 = Timer
Do While Timer - t0 < 0.5
Loop
'Play Day
lngRC = PlaySound(SoundFile + Csnd, 0&, &H2)
'then play Month
lngRC = PlaySound(SoundFile + Dsnd, 0&, &H2)
end sub
-----------------------
All works fine for ME!! because when it doesn't work I know it is because I have my speaker volume turned off!
I deal with that by turning on the volume. Eventually the user would figure that out but I don't want him cussing me until then. I don't want to rely on written directions in the help file or to have a msgbox box pop up saying "be sure vol is on etc." each time the option is selected.
Is there a way to test for state of speaker before I issue the cmd to speak?
Here is my code:
Private Sub Talk_Click()
Dim lngRC As Long
'First Play Tzolkin Coefficient
lngRC = PlaySound(SoundFile + Asnd, 0&, &H2)
'Then Say Tzolkin Day Name
lngRC = PlaySound(SoundFile + Bsnd, 0&, &H2)
Dim t0 'Pause between two dates
t0 = Timer
Do While Timer - t0 < 0.5
Loop
'Play Day
lngRC = PlaySound(SoundFile + Csnd, 0&, &H2)
'then play Month
lngRC = PlaySound(SoundFile + Dsnd, 0&, &H2)
end sub
-----------------------
All works fine for ME!! because when it doesn't work I know it is because I have my speaker volume turned off!
I deal with that by turning on the volume. Eventually the user would figure that out but I don't want him cussing me until then. I don't want to rely on written directions in the help file or to have a msgbox box pop up saying "be sure vol is on etc." each time the option is selected.
Is there a way to test for state of speaker before I issue the cmd to speak?