This is a visual basic 6.0 wav sound player class that plays any selected sound file in .wav format. It has the filename property to select the file and play property to play the sound file.

Please support our Visual Basic 4 / 5 / 6 advertiser: Programming Forums - DaniWeb Sister Site
msaqib msaqib is offline Offline Feb 3rd, 2006, 3:28 pm |
-1
This is a visual basic 6.0 wav sound player class that plays any selected sound file in .wav format. It has the filename property to select the file and play property to play the sound file. Visit http://www.mycplus.com for more codes.
Quick reply to this message  
Visual Basic 4 / 5 / 6 Syntax
  1. Option Explicit
  2. Private mfilename As String
  3. Private mflags As Long
  4. Private Declare Function sndPlaySound Lib "winmm.dll" Alias "sndPlaySoundA" (ByVal lpszSoundName As String, ByVal uFlags As Long) As Long
  5.  
  6.  
  7. Public Property Get filename() As String
  8. filename = mfilename
  9. End Property
  10.  
  11. Public Property Let filename(ByVal vnewvalue As String)
  12. mfilename = vnewvalue
  13. End Property
  14.  
  15. Public Property Get flags() As Long
  16. flags = mflags
  17. End Property
  18.  
  19. Public Property Let flags(ByVal vnewvalue As Long)
  20. mflags = vnewvalue
  21. End Property
  22.  
  23. Public Sub play()
  24. Dim rc As Long
  25. rc = sndPlaySound(mfilename, mflags)
  26. End Sub
0
karthik_02 karthik_02 is offline Offline | Mar 4th, 2007
how to select the file what we want..
where we have to place the code..
 
0
msaqib msaqib is offline Offline | Dec 25th, 2007
Actually that is the implementation of a class module in VB, to play a specified file you will need to import this class into your project and then set the property filename to the files you want to play.
 
0
mankind33 mankind33 is offline Offline | Dec 16th, 2008
Hi there, Thanks for the website and lots of appreciations.
I am a beginner in VB6.
I want to know how to put the systems master control of audio panel in my application of MMControl. and regulate the volume of out put.
How to make the videoscreen of this MMcontrol to full screen.!!
How to make the form fullscreen at run time with the controls proportionally expanded in the page.
How to open existing PDF or Doc files through this VB application.
I request an immediate reply. Thanks in advance and ATB.
If possible, please send a reply to my email id also :
mankind33@gmail.com
 
 

Message:


Thread Tools Search this Thread



Tag cloud for Visual Basic 4 / 5 / 6
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC