D
David Webb
Hi,
I found the following snippet of code in a form on the Open NETCF
site. When I add a new class and paste the code, it is having a hiccup
on the Declare word, after Private Shared statement. It says "Shared
is not valid on a Declare". This is probably simple so could someone
please point me in the right direction? I'm hoping this is an easy
solution to play a wave file.
Using VS.NET 2003, CF (VB.NET)
Regards,
David.
Imports System
Imports System.Runtime.InteropServices
Namespace InTheHand
Public Class Sound
Public Shared Sub Play(ByVal FileName As String)
Dim hResult As Integer = PlaySoundW(FileName, 0, 0)
End Sub 'Play
'playsound
Private Shared Declare Function PlaySoundW Lib "coredll.dll"
Alias "PlaySoundW" _
(ByVal lpszName As String, ByVal hModule As Integer, ByVal
dwFlags As Integer) As Integer
End Class 'Sound
End Namespace 'InTheHand
I found the following snippet of code in a form on the Open NETCF
site. When I add a new class and paste the code, it is having a hiccup
on the Declare word, after Private Shared statement. It says "Shared
is not valid on a Declare". This is probably simple so could someone
please point me in the right direction? I'm hoping this is an easy
solution to play a wave file.
Using VS.NET 2003, CF (VB.NET)
Regards,
David.
Imports System
Imports System.Runtime.InteropServices
Namespace InTheHand
Public Class Sound
Public Shared Sub Play(ByVal FileName As String)
Dim hResult As Integer = PlaySoundW(FileName, 0, 0)
End Sub 'Play
'playsound
Private Shared Declare Function PlaySoundW Lib "coredll.dll"
Alias "PlaySoundW" _
(ByVal lpszName As String, ByVal hModule As Integer, ByVal
dwFlags As Integer) As Integer
End Class 'Sound
End Namespace 'InTheHand