I am using Windows XP and I have found out how to substitute my own wav
sound for the Microsoft default sound when my computer starts, but now I
want to go a step further. I have created 7 different wave files
(C:\Start sound\day1.wav to C:\Start sound\day7.wav respectively)
and want to have a different one open according to the day of the week - the
"day1.wav" opening on Mondays and the "day2.wav" on Tuesdays and so on.
I have downloaded Visual Basic Express edition but I need to have a routine
created which I don't have the expertise to do.
I was very kindly given the following routine in a VB6 ng but because it
won't work in the Express Edition, they advised me to try a dotnet group for
the correct code. I have included it below because it just might be easily
amended by someone who is familiar but it may need to be completely
re-composed.
Can any kind person assist or point me in the right direction if this is the
wrong ng.
Thanks so much.
Option Explicit
Private Declare Function sndPlaySound Lib "winmm.dll" Alias _
"sndPlaySou ndA" (ByVal FileName As String, _
ByVal Flags As Long) As Long
Dim myDate As String
Private Sub Form_Load()
myDate = Format(Now, "dddd")
Debug.Print myDate
Select Case myDate
Case "Monday"
Call sndPlaySound("C :\start sound\day1.wav" , 1)
Case "Tuesday"
Call sndPlaySound("C :\start sound\day2.wav" , 1)
Case "Wednesday"
Call sndPlaySound("C :\start sound\day3.wav" , 1)
Case "Thursday"
Call sndPlaySound("C :\start sound\day4.wav" , 1)
Case "Friday"
Call sndPlaySound("C :\start sound\day5.wav" , 1)
Case "Saturday"
Call sndPlaySound("C :\start sound\day6.wav" , 1)
Case "Sunday"
Call sndPlaySound("C :\start sound\day7.wav" , 1)
End Select
End Sub
--
Regards, Jack Sadie
ja************@ yahooREMOVE.co. uk