How do you make it so when i click a button, it plays a wav. sound? for example... when i click cmdPlaySound, i want to hear "c:\windows\media\chimes.wav"
Code please?
Thanks a lot
Printable View
How do you make it so when i click a button, it plays a wav. sound? for example... when i click cmdPlaySound, i want to hear "c:\windows\media\chimes.wav"
Code please?
Thanks a lot
Put this into a module:
And then use this code:Code:Declare Function PlaySound Lib "winmm.dll" Alias "PlaySoundA" (ByVal lpszName As String, ByVal hModule As Long, ByVal dwFlags As Long) As Long
Public Const SND_ASYNC = &H1
Hope this helps...Code:Dim strFileName As String
strFileName = "C:\WINDOWS\CHIMES.WAV"
PlaySound strFileName, 0, SND_ASYNC