J
Jack Sadie
Armin,
Renewing my request for help to have a different Windows Start Sound for
each day of the week.
I have started again completely. Opened a new project called Windows
Application 1 and immediately selected the menu View/Code and entered the
text amended as suggested so that
Form 1.vb* now reads:
Public Class Form1
Private Declare Function sndPlaySound Lib
"winmm.dll" Alias _
"sndPlaySoundA" (ByVal FileName As String, _
ByVal Flags As Integer) As Boolean
Private Sub Form1_Load( _
ByVal sender As System.Object, _
ByVal e As System.EventArgs) _
Handles MyBase.Load
Dim day As Integer
Dim filename As String
day = Weekday(Now, FirstDayOfWeek.System)
filename = "C:\start sound\day" & day & ".wav"
Msgbox(sndPlaySound(filename, 1))
End Sub
End Class
At the foot now there is an error list with 2 errors. The first at line 2
Col 41 reads "String constant expected" and the second at line4 col 1 reads
"Syntax error".
The section at the right headed Data Sources records that my project
currently has no data sources associated and invites me to add New Data
Source and "data bind items etc"
I really feel out of my depth. I'm happy to press on but will be totally
reliant on help if you remain happy to assist.
Renewing my request for help to have a different Windows Start Sound for
each day of the week.
I have started again completely. Opened a new project called Windows
Application 1 and immediately selected the menu View/Code and entered the
text amended as suggested so that
Form 1.vb* now reads:
Public Class Form1
Private Declare Function sndPlaySound Lib
"winmm.dll" Alias _
"sndPlaySoundA" (ByVal FileName As String, _
ByVal Flags As Integer) As Boolean
Private Sub Form1_Load( _
ByVal sender As System.Object, _
ByVal e As System.EventArgs) _
Handles MyBase.Load
Dim day As Integer
Dim filename As String
day = Weekday(Now, FirstDayOfWeek.System)
filename = "C:\start sound\day" & day & ".wav"
Msgbox(sndPlaySound(filename, 1))
End Sub
End Class
At the foot now there is an error list with 2 errors. The first at line 2
Col 41 reads "String constant expected" and the second at line4 col 1 reads
"Syntax error".
The section at the right headed Data Sources records that my project
currently has no data sources associated and invites me to add New Data
Source and "data bind items etc"
I really feel out of my depth. I'm happy to press on but will be totally
reliant on help if you remain happy to assist.