Private Declare Function PlaySound Lib "winmm.dll" Alias "PlaySoundA" (ByVal lpszName As String, ByVal hModule As Long, ByVal dwFlags As Long) As Long
Const SND_ASYNC As Long = &H1
Public Sub Command1_Click()
PlaySound "SystemExclamation", 0&, SND_ASYNC
End Sub
Public Sub Command2_Click()
PlaySound "SystemExit", 0&, SND_ASYNC
End Sub
I can't get it to play the two sounds at the same time..
I click command2, then I quickly click command1, and it stops 2 automatically....
Well you can play multiple sounds at the same time, at least in different applications. I can be playing mp3s through winamp, test playing a sound from the sound thing in the control panel, and run the code you posted and have all three playing at the sametime.
Of course I'm not sure how you do this in VB, maybe research on using DirectSound.
Can't help with the DirectSound issue although I'm sure a search on Google will come up with something, but as for a sounds site here is one: http://wavcentral.com/
To have two or more different sounds play at the same time, the most effective, though not the most efficient, way is to load two or more instances of the Windows Media Player control, and play the sound files.
If the souds you are playing are just System Feedback sounds, system overhead in using two to four MPlayer controls should not be an issue.
anyone else got car alarm (arming & dis-arming) sounds??
I need them for my app!!
Also, how can I send a file (errlog.txt) to my email ([email protected]) through vb?
My friend suggests shelling a VB Script file, but I'm not sure what he meant by that. Anyway hes gone away for a few days, and I would like to know more on the issue.