5 Replies - 33158 Views - Last Post: 07 February 2015 - 12:16 PM

#1 Xenon   User is offline

  • Connection failed
  • member icon

Reputation: 9
  • View blog
  • Posts: 1,595
  • Joined: 12-September 05

Playing a Sound File From VB6 appl

Posted 27 October 2005 - 01:44 AM

Description: Declare the Function in a Module.Add sound effects to your application by calling this simple API function.
'-----------Add this Code to the Module---------
Declare Function sndPlaySound Lib "winmm.dll" Alias "sndPlaySoundA" (ByVal lpszSoundName As String, ByVal uFlags As Long) As Long
'--------------------------
general syntax

Result = sndPlaySound([Pathname],1)

'--------now take a command button in a form and call the event

Private Sub Command1_Click()
' This Sound is present in Win XP Home ED and may be also present in XP Professional.

Result = Module1.sndPlaySound("C:WINDOWSMediaWindows XP Hardware Insert", 1)
End Sub
'----------------------------------------------------



Is This A Good Question/Topic? 0
  • +

Replies To: Playing a Sound File From VB6 appl

#2 arnel0214   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 0
  • Joined: 02-July 08

Re: Playing a Sound File From VB6 appl

Posted 01 July 2008 - 11:54 PM

Hi! I am beginner in vb6.0 prog, can u send a sample how to play any sound file in vb6.0 from: [email protected], Arnel 21, Philippines
Was This Post Helpful? 0
  • +
  • -

#3 bhong   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 0
  • Joined: 20-October 08

Re: Playing a Sound File From VB6 appl

Posted 19 October 2008 - 10:11 PM

hi ellow guys i want to know how to create an audio file using vb
Was This Post Helpful? 0
  • +
  • -

#4 chuckjessup   User is offline

  • D.I.C Regular

Reputation: 34
  • View blog
  • Posts: 380
  • Joined: 26-October 09

Re: Playing a Sound File From VB6 appl

Posted 17 September 2010 - 09:00 PM

Opps, how do you get the file to play?
Was This Post Helpful? 0
  • +
  • -

#5 anbarasan   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 3
  • Joined: 02-September 07

Re: Playing a Sound File From VB6 appl

Posted 26 August 2012 - 05:05 AM

excellent 5 star
Was This Post Helpful? 0
  • +
  • -

#6 TheCoolFactor   User is offline

  • D.I.C Head

Reputation: 4
  • View blog
  • Posts: 53
  • Joined: 07-February 15

Re: Playing a Sound File From VB6 appl

Posted 07 February 2015 - 12:16 PM

also, here is this website i found. type the text and it will be created in mp3 :bigsmile: vozMe
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1