|
|
|
|
|
Dicas
|
|
Visual Basic (Imagem/Som/Multimídia)
|
|
|
Título da Dica: Toca sons em Wav através de APIs
|
|
|
|
Postada em 27/10/2003 por Tekki
'No module
Declare Function sndPlaySound Lib "winmm.dll" Alias "sndPlaySoundA" (ByVal lpszSoundName As String, ByVal uFlags As Long) As Long
Public Const SND_ALIAS = &H10000 ' name is a WIN.INI [sounds] entry Public Const SND_ASYNC = &H1 ' play asynchronously Public Const SND_LOOP = &H8 ' loop the sound until next sndPlaySound Public Const SND_NOWAIT = &H2000 ' don't wait if the driver is busy Public Const SND_SYNC = &H0 ' play synchronously (default)
'No form
public sub cmdPlaysoundClick() dim ret as long ret=sndplaysound("c:\SeuSom.wav",SND_SYNC) End Sub
|
|
|
|
|