muy facil..

añade esto a un modulo..
Private Declare Sub CopyMemory Lib "kernel32" Alias "RtlMoveMemory" (hpvDest As Any, hpvSource As Any, ByVal cbCopy As Long)

Private Declare Function sndPlaySound Lib "winmm.dll" Alias "sndPlaySoundA" (ByVal lpszSoundName As String, ByVal uFlags As Long) As Long

Private Const SND_ASYNC = &H1
Private Const SND_MEMORY = &H4



Public Sub PlaySoundResource(ResID As Integer)

Dim bSound() As Byte

bSound = LoadResData(ResID, "WAVE")


Dim aSound As String

aSound = Space$(UBound(bSound) + 1)

CopyMemory ByVal aSound, bSound(0), Len(aSound)

sndPlaySound aSound, SND_ASYNC Or SND_MEMORY

End Sub
luego en el commandbuton esto:
PlaySoundResource 102
y luego añade un sonido en .res. y al apretar el botón ara el sonido del registro.. espero averte ayudado "chiko.."

pd: recuerda de configurar el code con el nombre e tu res o no te funcionara..

SALUDOS!!
Soy un camaleón, en tu cama, leona ♪
Responder

Volver a “VB/.NET”