Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Playing a WAV file in the init() Method
Message
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00499683
Message ID:
00507001
Views:
13
This is a little better. I made a form method called PlayWav and do this:
	#DEFINE SND_SYNC 0x00
	#DEFINE SND_ASYNC 0x01

	Parameters cSndFile

		Declare Integer sndPlaySound in WinMM.DLL ;
			String cSoundName, ;
			Integer uFlags		
		If VarType(cSndFile) != "C"
			Return .f.
		EndIf
		If Empty(cSndFile)
			Return .f.
		EndIf
		sndPlaySound( cSndFile , SND_ASYNC )	
Now you get sound and don't have to wait. The only thing I am concerned with is that I am declaring the integer every time this is called, and am not sure if I am eating resources when I do this.... George? Ed?
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform