• 0

Making a sound button in VB6


Question

2 answers to this question

Recommended Posts

  • 0

This will only work for wav files. To play mp3/wma/etc, check out a lib like fmod, or use the ActiveMovie control type library.

Private Const SND_ASYNC = &H1

Private Const SND_FILENAME = &H20000

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

sndPlaySound "C:\Windows\Media\Windows XP Default.wav", SND_ASYNC Or SND_FILENAME

Link to comment
Share on other sites

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.