|
-
May 22nd, 2001, 05:28 PM
#1
Ok sorry about this guys, but no search function
Sorry in advance, would have used search but has been disabled SO here is a question which has been asked a million times previously....our internal archive server is down so cannot log in to extract the code.........................
Playing wav files.
Am using
Code:
Const SND_SYNC = &H0
Const SND_NODEFAULT = &H2
Call sndPlaySound(sWavFile, SND_SYNC Or SND_NODEFAULT)
In a public sub.
Get the following error
"Sub or FUnction not defined"
Do l have to do the declare in the same bas module?
-
May 22nd, 2001, 05:35 PM
#2
Addicted Member
That, or wherever you do declare the API call, make it and the constants public. I'd post the code, but the one app I used it in is archived and my archive hard drive is currently failing hideously
Things I've Said:
"Life's funny like that...elephants can wear frilly lace panties, and Dubya still looks like a monkey in a big chair"
"Take four goats and strap one to each foot of a llama. Presto, goat-powered llama!"
"You want to get me to work more, get me a Coke. No? Then deal with inferior garbage, I'm not coding another line and your clients can go to......thanks, I'd love a Coke right about now!"
-
May 22nd, 2001, 05:39 PM
#3
Code:
Private Declare Function PlaySound Lib "winmm.dll" Alias "PlaySoundA" (ByVal lpszName As String, ByVal hModule As Long, ByVal dwFlags As Long) As Long
Private Sub Command1_Click()
PlaySound "MyFile.wav", 0, 1
End Sub
-
May 22nd, 2001, 05:40 PM
#4
Public Declare Function sndPlaySound Lib "winmm.dll" Alias "sndPlaySoundA" (ByVal lpszSoundName As String, ByVal uFlags As Long) As Long
-
May 22nd, 2001, 05:41 PM
#5
Was again thanks guys.
Meg you are a live saver, am hour off giving a demo and the friggin API calls are not working. That's what ya get for coding on the bus on the way to a site l guess
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|